M12.4: retain read-only destination migration stages
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (network) (push) Successful in 20m44s
Foundation / checks (client) (push) Successful in 21m57s
Foundation / checks (tsan) (push) Successful in 22m46s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 30m2s
Foundation / checks (postgres) (push) Canceled after 29m56s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (network) (push) Successful in 20m44s
Foundation / checks (client) (push) Successful in 21m57s
Foundation / checks (tsan) (push) Successful in 22m46s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 30m2s
Foundation / checks (postgres) (push) Canceled after 29m56s
This commit is contained in:
+14
-3
@@ -123,6 +123,7 @@ SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_namespace WHERE nspname='evolution')
|
||||
SELECT :'history_v44' || ',45:' || :'migration_sha_45' AS history_v45 \gset
|
||||
SELECT :'history_v45' || ',46:' || :'migration_sha_46' AS history_v46 \gset
|
||||
SELECT :'history_v46' || ',47:' || :'migration_sha_47' AS history_v47 \gset
|
||||
SELECT :'history_v47' || ',48:' || :'migration_sha_48' AS history_v48 \gset
|
||||
SELECT :'history' = :'history_v22' AS at_v22,
|
||||
:'history' = :'history_v23' AS at_v23,
|
||||
:'history' = :'history_v24' AS at_v24,
|
||||
@@ -148,8 +149,10 @@ SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_namespace WHERE nspname='evolution')
|
||||
:'history' = :'history_v44' AS at_v44,
|
||||
:'history' = :'history_v45' AS at_v45,
|
||||
:'history' = :'history_v46' AS at_v46,
|
||||
:'history' = :'history_v47' AS at_v47 \gset
|
||||
\if :at_v47
|
||||
:'history' = :'history_v47' AS at_v47,
|
||||
:'history' = :'history_v48' AS at_v48 \gset
|
||||
\if :at_v48
|
||||
\elif :at_v47
|
||||
\elif :at_v46
|
||||
\elif :at_v45
|
||||
\elif :at_v44
|
||||
@@ -537,7 +540,8 @@ SELECT coalesce(max(version), 0) = 24 AS at_v24,
|
||||
coalesce(max(version), 0) = 44 AS at_v44,
|
||||
coalesce(max(version), 0) = 45 AS at_v45,
|
||||
coalesce(max(version), 0) = 46 AS at_v46,
|
||||
coalesce(max(version), 0) = 47 AS at_v47
|
||||
coalesce(max(version), 0) = 47 AS at_v47,
|
||||
coalesce(max(version), 0) = 48 AS at_v48
|
||||
FROM evolution.schema_migrations \gset
|
||||
\if :at_v24
|
||||
\ir 0025_cellular_v2_bundle.sql
|
||||
@@ -753,6 +757,7 @@ SELECT coalesce(max(version), 0) = 24 AS at_v24,
|
||||
\elif :at_v45
|
||||
\elif :at_v46
|
||||
\elif :at_v47
|
||||
\elif :at_v48
|
||||
\else
|
||||
\echo 'Unknown or changed migration history after v43'
|
||||
DO $$ BEGIN RAISE EXCEPTION 'unknown or changed migration history'; END $$;
|
||||
@@ -773,6 +778,10 @@ SELECT coalesce(max(version), 0) = 46 AS needs_v47 FROM evolution.schema_migrati
|
||||
\if :needs_v47
|
||||
\ir 0047_cellular_migration_freeze.sql
|
||||
\endif
|
||||
SELECT coalesce(max(version), 0) = 47 AS needs_v48 FROM evolution.schema_migrations \gset
|
||||
\if :needs_v48
|
||||
\ir 0048_cellular_migration_staging.sql
|
||||
\endif
|
||||
-- Effective-privilege audit on every run, including no-ops (ADR-0060). Attributes
|
||||
-- alone are insufficient: predefined roles such as pg_write_all_data, PUBLIC
|
||||
-- grants or SET-able memberships would bypass the fenced functions. Checks the
|
||||
@@ -792,6 +801,8 @@ BEGIN
|
||||
UNION
|
||||
SELECT m.member FROM pg_catalog.pg_auth_members m JOIN closure c ON m.roleid = c.oid
|
||||
), fenced(oid) AS (VALUES
|
||||
('evolution.stage_cellular_migration(evolution.u64,evolution.u64,uuid,evolution.u64,bytea,bytea,evolution.u64)'::regprocedure::oid),
|
||||
('evolution.load_cellular_migration_stage(evolution.u64,evolution.u64,uuid,evolution.u64)'::regprocedure::oid),
|
||||
('evolution.prepare_cellular_migration_freeze(evolution.u64,evolution.u64,uuid,evolution.u64,bytea)'::regprocedure::oid),
|
||||
('evolution.abort_cellular_migration_freeze(evolution.u64,evolution.u64,uuid,evolution.u64,uuid)'::regprocedure::oid),
|
||||
('evolution.load_cellular_migration_freeze(evolution.u64,evolution.u64,uuid,evolution.u64)'::regprocedure::oid),
|
||||
|
||||
Reference in New Issue
Block a user