version: "2" sql: - engine: "postgresql" schema: "db/migrations" # goose-annotated; sqlc parses these as the schema (ignores -- +goose Down) queries: "db/queries" # ONLY public-schema queries — no eeo queries here, so generated # matching code physically cannot reference eeo.candidate_demographics gen: go: package: "dbgen" out: "internal/platform/database/dbgen" sql_package: "pgx/v5" emit_json_tags: true emit_pointers_for_null_types: true emit_interface: true emit_empty_slices: true overrides: - db_type: "uuid" go_type: { import: "github.com/google/uuid", type: "UUID" } - db_type: "uuid" nullable: true go_type: { import: "github.com/google/uuid", type: "UUID", pointer: true } - db_type: "timestamptz" # BARE name (pg_catalog.timestamptz does NOT match under pgx/v5) go_type: "time.Time" - db_type: "timestamptz" nullable: true go_type: { type: "time.Time", pointer: true } - db_type: "pg_catalog.numeric" # covers AVG()/expression numeric results go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } # NUMERIC db_type override is IGNORED for plain columns under pgx/v5 — a per-column override # is REQUIRED on every numeric table column to honor the decimal-determinism rule. - column: "opportunities.value" go_type: { import: "github.com/shopspring/decimal", type: "Decimal", pointer: true } - column: "usaspending_awards.award_amount" go_type: { import: "github.com/shopspring/decimal", type: "Decimal", pointer: true } - column: "bls_wages.value" go_type: { import: "github.com/shopspring/decimal", type: "Decimal", pointer: true } - column: "opportunity_records.estimated_value" go_type: { import: "github.com/shopspring/decimal", type: "Decimal", pointer: true } - column: "slate_members.total_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "slate_members.clearance_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "slate_members.skills_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "slate_members.certs_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "slate_members.customer_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "slate_members.experience_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "slate_members.location_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "candidate_evaluations.total_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "candidate_evaluations.clearance_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "candidate_evaluations.skills_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "candidate_evaluations.certs_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "candidate_evaluations.customer_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "candidate_evaluations.experience_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "candidate_evaluations.location_score" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } - column: "staffing_recommendations.confidence" go_type: { import: "github.com/shopspring/decimal", type: "Decimal" } # curation_proposals.proposed_strength is a NULLABLE plain numeric, which the pg_catalog.numeric # override does not reach, so a per column override pins it to shopspring decimal (the determinism rule). - column: "curation_proposals.proposed_strength" go_type: { import: "github.com/shopspring/decimal", type: "Decimal", pointer: true } - db_type: "vector" go_type: { import: "github.com/pgvector/pgvector-go", package: "pgvector", type: "Vector" } - db_type: "vector" nullable: true go_type: { import: "github.com/pgvector/pgvector-go", package: "pgvector", type: "Vector", pointer: true }