mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: put overrides and renames in pkg context in sqlc.yaml (#11347)
* chore: Put overrides and renames in pkg context in sqlc.yaml --------- Co-authored-by: Andrew Benton <andrewmbenton@gmail.com>
This commit is contained in:
@ -5,10 +5,27 @@ version: "2"
|
|||||||
cloud:
|
cloud:
|
||||||
# This is the static ID for the coder project.
|
# This is the static ID for the coder project.
|
||||||
project: "01HEP08N3WKWRFZT3ZZ9Q37J8X"
|
project: "01HEP08N3WKWRFZT3ZZ9Q37J8X"
|
||||||
# Ideally renames & overrides would go under the sql section, but there is a
|
sql:
|
||||||
# bug in sqlc that only global renames & overrides are currently being applied.
|
- schema: "./dump.sql"
|
||||||
overrides:
|
queries: "./queries"
|
||||||
|
engine: "postgresql"
|
||||||
|
# This only works if you are running a local postgres database with the
|
||||||
|
# schema loaded and migrations run. Run `make sqlc-vet` to run the linter.
|
||||||
|
database:
|
||||||
|
uri: "${SQLC_DATABASE_URL}"
|
||||||
|
analyzer:
|
||||||
|
database: false
|
||||||
|
rules:
|
||||||
|
- sqlc/db-prepare
|
||||||
|
gen:
|
||||||
go:
|
go:
|
||||||
|
package: "database"
|
||||||
|
out: "./queries"
|
||||||
|
emit_interface: true
|
||||||
|
emit_json_tags: true
|
||||||
|
emit_db_tags: true
|
||||||
|
emit_enum_valid_method: true
|
||||||
|
emit_all_enum_values: true
|
||||||
overrides:
|
overrides:
|
||||||
- column: "provisioner_daemons.tags"
|
- column: "provisioner_daemons.tags"
|
||||||
go_type:
|
go_type:
|
||||||
@ -83,25 +100,3 @@ overrides:
|
|||||||
oauth2_provider_app: OAuth2ProviderApp
|
oauth2_provider_app: OAuth2ProviderApp
|
||||||
oauth2_provider_app_secret: OAuth2ProviderAppSecret
|
oauth2_provider_app_secret: OAuth2ProviderAppSecret
|
||||||
callback_url: CallbackURL
|
callback_url: CallbackURL
|
||||||
|
|
||||||
sql:
|
|
||||||
- schema: "./dump.sql"
|
|
||||||
queries: "./queries"
|
|
||||||
engine: "postgresql"
|
|
||||||
# This only works if you are running a local postgres database with the
|
|
||||||
# schema loaded and migrations run. Run `make sqlc-vet` to run the linter.
|
|
||||||
database:
|
|
||||||
uri: "${SQLC_DATABASE_URL}"
|
|
||||||
analyzer:
|
|
||||||
database: false
|
|
||||||
rules:
|
|
||||||
- sqlc/db-prepare
|
|
||||||
gen:
|
|
||||||
go:
|
|
||||||
package: "database"
|
|
||||||
out: "./queries"
|
|
||||||
emit_interface: true
|
|
||||||
emit_json_tags: true
|
|
||||||
emit_db_tags: true
|
|
||||||
emit_enum_valid_method: true
|
|
||||||
emit_all_enum_values: true
|
|
||||||
|
Reference in New Issue
Block a user