mirror of
https://github.com/PrivateCaptcha/PrivateCaptcha.git
synced 2026-02-09 07:19:08 -06:00
80 lines
3.4 KiB
YAML
80 lines
3.4 KiB
YAML
version: "2"
|
|
sql:
|
|
- engine: "postgresql"
|
|
queries: "queries/postgres"
|
|
schema: "migrations/postgres"
|
|
database:
|
|
uri: "${PC_POSTGRES}"
|
|
analyzer:
|
|
database: false
|
|
rules:
|
|
- sqlc/db-prepare
|
|
gen:
|
|
go:
|
|
package: "generated"
|
|
sql_package: "pgx/v5"
|
|
out: "generated"
|
|
emit_interface: true
|
|
emit_db_tags: true
|
|
emit_json_tags: true
|
|
emit_result_struct_pointers: true
|
|
emit_params_struct_pointers: true
|
|
#emit_pointers_for_null_types: true
|
|
rename:
|
|
#"backend_(.*)": "$1"
|
|
backend_deleted_record: DeletedRecord
|
|
backend_apikey: "APIKey"
|
|
backend_subscription: Subscription
|
|
backend_user: User
|
|
backend_organization: Organization
|
|
backend_access_level: AccessLevel
|
|
backend_organization_user: OrganizationUser
|
|
backend_difficulty_growth: DifficultyGrowth
|
|
backend_property: Property
|
|
backend_cache: Cache
|
|
backend_lock: Lock
|
|
backend_difficulty_growth_constant: DifficultyGrowthConstant
|
|
backend_difficulty_growth_slow: DifficultyGrowthSlow
|
|
backend_difficulty_growth_medium: DifficultyGrowthMedium
|
|
backend_difficulty_growth_fast: DifficultyGrowthFast
|
|
backend_access_level_member: AccessLevelMember
|
|
backend_access_level_invited: AccessLevelInvited
|
|
backend_access_level_owner: AccessLevelOwner
|
|
backend_system_notification: SystemNotification
|
|
backend_subscription_source: SubscriptionSource
|
|
backend_subscription_source_external: SubscriptionSourceExternal
|
|
backend_subscription_source_internal: SubscriptionSourceInternal
|
|
backend_notification_template: NotificationTemplate
|
|
backend_user_notification: UserNotification
|
|
backend_audit_log: AuditLog
|
|
backend_audit_log_action: AuditLogAction
|
|
backend_audit_log_action_create: AuditLogActionCreate
|
|
backend_audit_log_action_update: AuditLogActionUpdate
|
|
backend_audit_log_action_delete: AuditLogActionDelete
|
|
backend_audit_log_action_unknown: AuditLogActionUnknown
|
|
backend_audit_log_action_softdelete: AuditLogActionSoftDelete
|
|
backend_audit_log_action_recover: AuditLogActionRecover
|
|
backend_audit_log_action_login: AuditLogActionLogin
|
|
backend_audit_log_action_logout: AuditLogActionLogout
|
|
backend_audit_log_action_access: AuditLogActionAccess
|
|
backend_apikey_scope: ApiKeyScope
|
|
backend_apikey_scope_puzzle: ApiKeyScopePuzzle
|
|
backend_apikey_scope_portal: ApiKeyScopePortal
|
|
backend_audit_log_source: AuditLogSource
|
|
backend_audit_log_source_unknown: AuditLogSourceUnknown
|
|
backend_audit_log_source_portal: AuditLogSourcePortal
|
|
backend_audit_log_source_api: AuditLogSourceApi
|
|
backend_async_task: AsyncTask
|
|
overrides:
|
|
- db_type: "pg_catalog.interval"
|
|
go_type: "time.Duration"
|
|
- db_type: "pg_catalog.interval"
|
|
# It seems like this could be the simpler `go_type: "*time.Duration"`, but
|
|
# that outputs double points like `**time.Duration` for reasons that are
|
|
# beyond me (bug?). The expanded version of `go_type` usage below works.
|
|
go_type:
|
|
import: "time"
|
|
type: "Duration"
|
|
pointer: true
|
|
nullable: true
|