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.
18 lines
561 B
SQL
18 lines
561 B
SQL
-- name: AddProviderState :exec
|
|
INSERT INTO core.provider_states (provider, state)
|
|
VALUES ($1, $2)
|
|
ON CONFLICT (provider, state) DO NOTHING;
|
|
|
|
-- name: ListProviderStates :many
|
|
SELECT state FROM core.provider_states
|
|
WHERE provider = $1 ORDER BY state;
|
|
|
|
-- name: ListAllProviderStates :many
|
|
SELECT provider, state FROM core.provider_states
|
|
ORDER BY provider, state;
|
|
|
|
-- name: DeleteProviderStatesNotIn :exec
|
|
-- Boot reconciliation: drop states a provider no longer declares.
|
|
DELETE FROM core.provider_states
|
|
WHERE provider = $1 AND state <> ALL(@states::text[]);
|