version: "2"
sql:
  - engine: "postgresql"
    schema: "db/schema.sql"
    queries: "db/query/"
    gen:
      go:
        package: "sqlc"
        out: "internal/gen/sqlc"
        sql_package: "pgx/v5"
        emit_json_tags: true
        emit_prepared_queries: true
        emit_interface: false
        emit_exact_table_names: false
        emit_empty_slices: true
        overrides:
          - column: "users_with_roles.roles"
            go_type:
              import: "history-api/models"
              type: "[]Role"
          - db_type: json
            go_type: encoding/json.RawMessage
          - db_type: jsonb
            go_type: encoding/json.RawMessage
          - db_type: vector
            go_type: 
              import: "github.com/pgvector/pgvector-go"
              type: "Vector"