version: "2" sql: - engine: "postgresql" schema: - "../db/migrations/" - "../db/sqlc_schemas.sql" queries: "queries/" gen: go: package: "entitlements" 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: # Identity core_person: Person core_persons: Person core_user: User core_users: User # Organization 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 # org_types was never explicitly renamed pre-consolidation (old # schema "organization"); preserve its old default-computed name # verbatim now that the schema prefix is "core" instead. core_org_type: OrganizationOrgType core_org_types: OrganizationOrgType # Billing core_account: Account core_accounts: Account core_price: Price core_prices: Price core_product: Product core_products: Product core_subscription: Subscription core_subscriptions: Subscription core_subscription_item: SubscriptionItem core_subscription_items: SubscriptionItem core_subscription_change: SubscriptionChange core_subscription_changes: SubscriptionChange core_plan_ladder: PlanLadder core_plan_ladders: PlanLadder core_plan_ladder_tier: PlanLadderTier core_plan_ladder_tiers: PlanLadderTier # invoices/payments/payment_methods/product_kinds were never # explicitly renamed pre-consolidation (old schema "billing"); # preserve their old default-computed Billing*-prefixed names # verbatim. core_invoice: BillingInvoice core_invoices: BillingInvoice core_invoice_line_item: BillingInvoiceLineItem core_invoice_line_items: BillingInvoiceLineItem core_payment: BillingPayment core_payments: BillingPayment core_payment_method: BillingPaymentMethod core_payment_methods: BillingPaymentMethod core_product_kind: BillingProductKind core_product_kinds: BillingProductKind # Entitlements (own domain) core_pool_provision_ladder: PoolProvisionLadder core_pool_provision_ladders: PoolProvisionLadder core_pool_provision_transition: PoolProvisionTransition core_pool_provision_transitions: PoolProvisionTransition core_grant: Grant core_grants: Grant core_resource_pool: ResourcePool core_resource_pools: ResourcePool core_resource_key: ResourceKey core_resource_keys: ResourceKey core_pool_assignment: PoolAssignment core_pool_assignments: PoolAssignment core_pool_provision: PoolProvision core_pool_provisions: PoolProvision core_entitlement_set: EntitlementSet core_entitlement_sets: EntitlementSet core_entitlement_set_rule: EntitlementSetRule core_entitlement_set_rules: EntitlementSetRule core_numeric_entitlement: NumericEntitlement core_numeric_entitlements: NumericEntitlement core_numeric_entitlement_contribution: NumericEntitlementContribution core_numeric_entitlement_contributions: NumericEntitlementContribution core_numeric_entitlement_usage: NumericEntitlementUsage core_boolean_entitlement: BooleanEntitlement core_boolean_entitlements: BooleanEntitlement core_numeric_entitlement_usages: NumericEntitlementUsage core_subscription_scheduled_change: BillingSubscriptionScheduledChange core_subscription_scheduled_changes: BillingSubscriptionScheduledChange # Spillover tables pulled in because ../db/migrations/ declares the # whole "core" schema (integration's domain; entitlements did not # pull these in pre-consolidation). Renamed to match the exact # pre-consolidation type names -- see internal/integration/sqlc.yaml # for the canonical mapping this list is drawn from. core_provider: Provider core_providers: Provider core_provider_operation: ProviderOperation core_provider_operations: ProviderOperation core_provider_state: IntegrationProviderState core_provider_states: IntegrationProviderState core_outbox: IntegrationOutbox core_outboxes: IntegrationOutbox core_webhook_event: IntegrationWebhookEvent core_webhook_events: IntegrationWebhookEvent overrides: - db_type: "uuid" go_type: "string"