version: "2"
sql:
  - engine: "postgresql"
    queries: "./internal/db/queries"
    schema: "./internal/db/migrations"
    gen:
      go:
        emit_json_tags: true
        package: "repository"
        out: "internal/db/repository"
        sql_package: "pgx/v5"
        overrides: 
          - db_type: "pg_catalog.timestamp"
            go_type:
              import: "time"
              type: "Time"
          - db_type: "pg_catalog.timestamp"
            nullable: true
            go_type:
              pointer: true
              import: "time"
              type: "Time"
          - db_type: "pg_catalog.varchar"
            nullable: true
            go_type:
              pointer: true
              type: "string"
          - db_type: "int4"
            nullable: true
            go_type:
              pointer: true
              type: "int32"
          - db_type: "int4"
            nullable: false
            go_type:
              type: "int32"
          - db_type: "date"
            nullable: false
            go_type:
              import: "time"
              type: "Time"
