chore: use sqlc-vet to verify schema (#12642)

This commit is contained in:
Marcin Tojek 2024-03-18 15:23:25 +01:00 committed by GitHub
parent e5cc17af92
commit 15845d1a65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -17,6 +17,7 @@ sql:
database: false
rules:
- sqlc/db-prepare
- do-not-use-public-schema-in-queries
gen:
go:
package: "database"
@ -104,3 +105,9 @@ sql:
api_key_id: APIKeyID
callback_url: CallbackURL
login_type_oauth2_provider_app: LoginTypeOAuth2ProviderApp
rules:
- name: do-not-use-public-schema-in-queries
message: "do not use public schema in queries"
# FIXME: It would be great to run sqlc-vet against `migrations` directory and `dump.sql`.
rule: >
query.sql.matches(r'[^a-z]public\.')