Files
member-console/internal/integration/queries/provider_operations.sql
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

18 lines
629 B
SQL

-- name: AddProviderOperation :exec
INSERT INTO core.provider_operations (provider, operation)
VALUES ($1, $2)
ON CONFLICT (provider, operation) DO NOTHING;
-- name: ListProviderOperations :many
SELECT operation FROM core.provider_operations
WHERE provider = $1 ORDER BY operation;
-- name: ListAllProviderOperations :many
SELECT provider, operation FROM core.provider_operations
ORDER BY provider, operation;
-- name: DeleteProviderOperationsNotIn :exec
-- Boot reconciliation: drop operations a provider no longer declares.
DELETE FROM core.provider_operations
WHERE provider = $1 AND operation <> ALL(@operations::text[]);