-
Notifications
You must be signed in to change notification settings - Fork 251
/
sqlc.yaml
60 lines (60 loc) · 1.96 KB
/
sqlc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '2'
sql:
- schema:
- swo/swoinfo/pgtables.sql
- swo/swosync/changelog.sql
- migrate/migrations/20180816094955-switchover-state.sql
- migrate/migrations/20220808103727-switchover-mk2.sql
queries:
- swo/*/queries.sql
- swo/queries.sql
engine: postgresql
gen:
go:
out: swo/swodb
sql_package: pgx/v5
- schema:
- migrate/schema.sql
- swo/swoinfo/pgtables.sql
- swo/swosync/changelog.sql
queries:
- '*/queries.sql'
- '*/*/queries.sql'
engine: postgresql
gen:
go:
out: gadb
sql_package: database/sql
overrides:
- db_type: pg_catalog.interval
go_type:
import: github.com/target/goalert/util/sqlutil
type: Interval
- db_type: interval
go_type:
import: github.com/target/goalert/util/sqlutil
type: Interval
- column: public.schedule_rules.start_time
go_type:
import: github.com/target/goalert/util/timeutil
type: Clock
- column: public.schedule_rules.end_time
go_type:
import: github.com/target/goalert/util/timeutil
type: Clock
- column: public.outgoing_messages.provider_msg_id
go_type:
type: ProviderMessageID
- column: public.user_contact_methods.dest
go_type:
# Note: We can't use the nullable/non-nullable types here because
# sqlc doesn't support it for column overrides yet.
#
# Since it's common to have NULL (i.e., when scanning contact methods and notificaiton channels at once) we use the nullable type.
type: NullDestV1
- column: public.notification_channels.dest
go_type:
type: NullDestV1
- column: public.uik_config.config
go_type:
type: UIKConfig