version: "2"

sql:
  - engine: "postgresql"
    schema: "internal/db/schema.sql"
    queries: "internal/db/queries.sql"
    gen:
      go:
        package: "sqlc"
        out: "internal/db/sqlc"
        sql_package: "pgx/v5"
        emit_interface: true
        emit_db_tags: true
        overrides:
          - db_type: "uuid"
            go_type:
              import: "github.com/google/uuid"
              type: "UUID"
          - db_type: "pg_catalog.uuid"
            nullable: true
            go_type:
              import: "github.com/google/uuid"
              type: "UUID"
              pointer: true
          - db_type: "pg_catalog.timestamptz"
            go_type:
              import: "time"
              type: "Time"
