Files
member-console/internal/organization/sqlc.yaml
T
cgalo5758 b0072d8971 Consolidate domain tables into core schema
Squash the pre-production migration history into fresh core, fedwiki,
and stripe baselines and reduce the canonical source list to those
three streams.

Update sqlc configs, generated queries, raw SQL, tests, and docs while
keeping provider tables schema-qualified.

BREAKING: existing local database volumes must be wiped because goose
version history restarts from the new baselines.
2026-07-05 20:10:23 -05:00

106 lines
4.8 KiB
YAML

version: "2"
sql:
- engine: "postgresql"
schema:
- "../db/migrations/"
- "../db/sqlc_schemas.sql"
queries: "queries/"
gen:
go:
package: "organization"
out: "."
sql_package: "database/sql"
emit_json_tags: true
emit_prepared_queries: false
emit_interface: true
emit_exact_table_names: false
emit_empty_slices: true
omit_unused_structs: true
rename:
core_person: Person
core_persons: Person
core_user: User
core_users: User
core_organization: Organization
core_organizations: Organization
core_workspace: Workspace
core_workspaces: Workspace
core_role: Role
core_roles: Role
core_role_assignment: RoleAssignment
core_role_assignments: RoleAssignment
core_org_member: OrgMember
core_org_members: OrgMember
core_org_type: OrgType
core_org_types: OrgType
# Spillover tables pulled in because ../db/migrations/ declares the
# whole "core" schema. Renamed to match the exact pre-consolidation
# type names (from their old owning schema) so model diffs stay
# schema-string-only -- see internal/integration/sqlc.yaml for the
# canonical mapping this list is drawn from.
core_account: BillingAccount
core_accounts: BillingAccount
core_entitlement_set: EntitlementsEntitlementSet
core_entitlement_sets: EntitlementsEntitlementSet
core_entitlement_set_rule: EntitlementsEntitlementSetRule
core_entitlement_set_rules: EntitlementsEntitlementSetRule
core_grant: EntitlementsGrant
core_grants: EntitlementsGrant
core_invoice: BillingInvoice
core_invoices: BillingInvoice
core_invoice_line_item: BillingInvoiceLineItem
core_invoice_line_items: BillingInvoiceLineItem
core_numeric_entitlement: EntitlementsNumericEntitlement
core_numeric_entitlements: EntitlementsNumericEntitlement
core_numeric_entitlement_contribution: EntitlementsNumericEntitlementContribution
core_numeric_entitlement_contributions: EntitlementsNumericEntitlementContribution
core_numeric_entitlement_usage: EntitlementsNumericEntitlementUsage
core_numeric_entitlement_usages: EntitlementsNumericEntitlementUsage
core_outbox: IntegrationOutbox
core_outboxes: IntegrationOutbox
core_payment: BillingPayment
core_payments: BillingPayment
core_payment_method: BillingPaymentMethod
core_payment_methods: BillingPaymentMethod
core_plan_ladder: BillingPlanLadder
core_plan_ladders: BillingPlanLadder
core_plan_ladder_tier: BillingPlanLadderTier
core_plan_ladder_tiers: BillingPlanLadderTier
core_pool_assignment: EntitlementsPoolAssignment
core_pool_assignments: EntitlementsPoolAssignment
core_pool_provision: EntitlementsPoolProvision
core_pool_provisions: EntitlementsPoolProvision
core_pool_provision_ladder: EntitlementsPoolProvisionLadder
core_pool_provision_ladders: EntitlementsPoolProvisionLadder
core_pool_provision_transition: EntitlementsPoolProvisionTransition
core_pool_provision_transitions: EntitlementsPoolProvisionTransition
core_price: BillingPrice
core_prices: BillingPrice
core_product: BillingProduct
core_products: BillingProduct
core_product_kind: BillingProductKind
core_product_kinds: BillingProductKind
core_provider: Provider
core_providers: Provider
core_provider_operation: ProviderOperation
core_provider_operations: ProviderOperation
core_provider_state: IntegrationProviderState
core_provider_states: IntegrationProviderState
core_resource_key: ResourceKey
core_resource_keys: ResourceKey
core_resource_pool: EntitlementsResourcePool
core_resource_pools: EntitlementsResourcePool
core_subscription: BillingSubscription
core_subscriptions: BillingSubscription
core_subscription_change: BillingSubscriptionChange
core_subscription_changes: BillingSubscriptionChange
core_subscription_item: BillingSubscriptionItem
core_subscription_items: BillingSubscriptionItem
core_subscription_scheduled_change: BillingSubscriptionScheduledChange
core_subscription_scheduled_changes: BillingSubscriptionScheduledChange
core_webhook_event: IntegrationWebhookEvent
core_webhook_events: IntegrationWebhookEvent
overrides:
- db_type: "uuid"
go_type: "string"