-- Create hbcc_providers table
CREATE TABLE IF NOT EXISTS hbcc_providers (
    id SERIAL PRIMARY KEY,
    provider_code VARCHAR(10) NOT NULL UNIQUE,
    county VARCHAR(50) NOT NULL,
    chp_name VARCHAR(255),
    number_of_children INTEGER,
    marital_status VARCHAR(50),
    education_level VARCHAR(50),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT unique_provider_code UNIQUE (provider_code)
);

-- Create indexes
CREATE INDEX IF NOT EXISTS idx_hbcc_providers_county ON hbcc_providers(county);
CREATE INDEX IF NOT EXISTS idx_hbcc_providers_provider_code ON hbcc_providers(provider_code);
