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.
20 lines
583 B
SQL
20 lines
583 B
SQL
-- name: CreateNumericEntitlement :one
|
|
INSERT INTO core.numeric_entitlements (pool_id, resource_key, entitlement_type, resource_limit)
|
|
VALUES ($1, $2, $3, $4)
|
|
RETURNING *;
|
|
|
|
-- name: GetNumericEntitlementByPoolAndResource :one
|
|
SELECT * FROM core.numeric_entitlements
|
|
WHERE pool_id = $1 AND resource_key = $2;
|
|
|
|
-- name: UpdateNumericEntitlementLimit :one
|
|
UPDATE core.numeric_entitlements
|
|
SET resource_limit = $2
|
|
WHERE entitlement_id = $1
|
|
RETURNING *;
|
|
|
|
-- name: ListNumericEntitlementsByPoolID :many
|
|
SELECT * FROM core.numeric_entitlements
|
|
WHERE pool_id = $1
|
|
ORDER BY resource_key ASC;
|