38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
version: "2"
|
|
sql:
|
|
- engine: "postgresql"
|
|
queries: "internal/db/sql/queries/*.sql"
|
|
schema: "internal/db/sql/migrations"
|
|
gen:
|
|
go:
|
|
package: "db"
|
|
out: "internal/db/"
|
|
sql_package: "pgx/v5"
|
|
emit_interface: true
|
|
emit_json_tags: true
|
|
emit_empty_slices: true
|
|
emit_enum_valid_method: true
|
|
emit_all_enum_values: true
|
|
emit_prepared_queries: true
|
|
emit_pointers_for_null_types: true
|
|
omit_unused_structs: true
|
|
emit_result_struct_pointers: true
|
|
overrides:
|
|
- db_type: "pg_catalog.timestamptz"
|
|
nullable: false
|
|
go_type:
|
|
import: "time"
|
|
type: "Time"
|
|
|
|
- db_type: "pg_catalog.timestamptz"
|
|
nullable: true
|
|
go_type:
|
|
import: "time"
|
|
type: "Time"
|
|
pointer: true
|
|
- column: "bots.install_context"
|
|
go_type:
|
|
type: "InstallContext"
|
|
- column: "bots.status"
|
|
go_type:
|
|
type: "BotStatus"
|