34 lines
1 KiB
YAML
34 lines
1 KiB
YAML
version: "2"
|
|
sql:
|
|
- engine: "postgresql"
|
|
queries: "postgres/queries"
|
|
schema: "postgres/migrations"
|
|
gen:
|
|
go:
|
|
package: "database"
|
|
out: "../pkg/database"
|
|
sql_package: "pgx/v5"
|
|
query_parameter_limit: 3
|
|
emit_json_tags: true
|
|
emit_interface: true
|
|
emit_pointers_for_null_types: true
|
|
overrides:
|
|
- db_type: "uuid"
|
|
go_type:
|
|
import: "github.com/google/uuid"
|
|
type: "UUID"
|
|
- db_type: "pg_catalog.int4"
|
|
go_type: "int"
|
|
- db_type: "pg_catalog.serial4"
|
|
go_type: "int"
|
|
- db_type: "integer"
|
|
go_type: "int"
|
|
- db_type: "pg_catalog.timestamp"
|
|
go_type: "time.Time"
|
|
- db_type: "pg_catalog.text"
|
|
go_type: "string"
|
|
- column: "talkgroups.alert_config"
|
|
go_type:
|
|
import: "dynatron.me/x/stillbox/pkg/alerting/rules"
|
|
type: "AlertRules"
|
|
nullable: true
|