From 21230e1c617d7cd5ab6096028879cae66262b053 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Tue, 1 Oct 2024 15:36:05 -0400 Subject: [PATCH] db: Re-order migrations for next release (#5146) Refs: 37bf59243a7a67fdb19ce942cde425301ed8eb12 Refs: 3609658edddc9ba991711ba2f279ea873f2e8195 --- internal/db/schema/migrations/oss/postgres/0/50_session.up.sql | 2 +- .../migrations/oss/postgres/15/01_wh_rename_key_columns.up.sql | 2 +- .../migrations/oss/postgres/28/02_prior_session_trigger.up.sql | 2 +- .../oss/postgres/29/01_cancel_session_null_fkey.up.sql | 2 +- .../migrations/oss/postgres/72/03_session_list_perf_fix.up.sql | 2 +- .../migrations/oss/postgres/84/02_wh_upsert_user_refact.up.sql | 2 +- .../02_session_state_tstzrange.up.sql} | 0 .../03_cancel_session_trigger.up.sql} | 0 8 files changed, 6 insertions(+), 6 deletions(-) rename internal/db/schema/migrations/oss/postgres/{91/06_session_state_tstzrange.up.sql => 92/02_session_state_tstzrange.up.sql} (100%) rename internal/db/schema/migrations/oss/postgres/{91/07_cancel_session_trigger.up.sql => 92/03_cancel_session_trigger.up.sql} (100%) diff --git a/internal/db/schema/migrations/oss/postgres/0/50_session.up.sql b/internal/db/schema/migrations/oss/postgres/0/50_session.up.sql index 1c2b2f566..6eba864bb 100644 --- a/internal/db/schema/migrations/oss/postgres/0/50_session.up.sql +++ b/internal/db/schema/migrations/oss/postgres/0/50_session.up.sql @@ -395,7 +395,7 @@ begin; references session_state (session_id, end_time) ); - -- Replaced in 91/06_session_state_tstzrange.up.sql + -- Replaced in 92/02_session_state_tstzrange.up.sql create trigger immutable_columns before update on session_state for each row execute procedure immutable_columns('session_id', 'state', 'start_time', 'previous_end_time'); diff --git a/internal/db/schema/migrations/oss/postgres/15/01_wh_rename_key_columns.up.sql b/internal/db/schema/migrations/oss/postgres/15/01_wh_rename_key_columns.up.sql index 7ecc4a146..a53141cb5 100644 --- a/internal/db/schema/migrations/oss/postgres/15/01_wh_rename_key_columns.up.sql +++ b/internal/db/schema/migrations/oss/postgres/15/01_wh_rename_key_columns.up.sql @@ -397,7 +397,7 @@ begin; end; $$ language plpgsql; - -- Replaced in 91/06_session_state_tstzrange.up.sql + -- Replaced in 92/02_session_state_tstzrange.up.sql create trigger wh_insert_session_state after insert on session_state for each row execute function wh_insert_session_state(); diff --git a/internal/db/schema/migrations/oss/postgres/28/02_prior_session_trigger.up.sql b/internal/db/schema/migrations/oss/postgres/28/02_prior_session_trigger.up.sql index 72f82fac8..d81d37632 100644 --- a/internal/db/schema/migrations/oss/postgres/28/02_prior_session_trigger.up.sql +++ b/internal/db/schema/migrations/oss/postgres/28/02_prior_session_trigger.up.sql @@ -77,7 +77,7 @@ begin end; $$; -- Replaces trigger from 0/50_session.up.sql --- Replaced in 91/06_session_state_tstzrange.up.sql +-- Replaced in 92/02_session_state_tstzrange.up.sql -- Update insert session state transition trigger drop trigger insert_session_state on session_state; drop function insert_session_state(); diff --git a/internal/db/schema/migrations/oss/postgres/29/01_cancel_session_null_fkey.up.sql b/internal/db/schema/migrations/oss/postgres/29/01_cancel_session_null_fkey.up.sql index ffd89cb3c..98a294984 100644 --- a/internal/db/schema/migrations/oss/postgres/29/01_cancel_session_null_fkey.up.sql +++ b/internal/db/schema/migrations/oss/postgres/29/01_cancel_session_null_fkey.up.sql @@ -9,7 +9,7 @@ drop function cancel_session(in sessionId text); -- Sessions can progress directly to terminated without going through the canceling state -- cancel_session will insert a cancel state for the session, if there's isn't -- a canceled or terminated state already. It's used by cancel_session_with_null_fk. --- Replaced in 91/07_cancel_session_trigger.up.sql +-- Replaced in 92/03_cancel_session_trigger.up.sql create function cancel_session(in sessionId text) returns void as $$ declare diff --git a/internal/db/schema/migrations/oss/postgres/72/03_session_list_perf_fix.up.sql b/internal/db/schema/migrations/oss/postgres/72/03_session_list_perf_fix.up.sql index 809fe54a1..5a5b93e6e 100644 --- a/internal/db/schema/migrations/oss/postgres/72/03_session_list_perf_fix.up.sql +++ b/internal/db/schema/migrations/oss/postgres/72/03_session_list_perf_fix.up.sql @@ -4,7 +4,7 @@ begin; -- Replaces the view created in 69/02_session_worker_protocol.up.sql - -- Replaced in 91/06_session_state_tstzrange.up.sql + -- Replaced in 92/02_session_state_tstzrange.up.sql drop view session_list; create view session_list as select s.public_id, diff --git a/internal/db/schema/migrations/oss/postgres/84/02_wh_upsert_user_refact.up.sql b/internal/db/schema/migrations/oss/postgres/84/02_wh_upsert_user_refact.up.sql index a55e0aeed..c925aca75 100644 --- a/internal/db/schema/migrations/oss/postgres/84/02_wh_upsert_user_refact.up.sql +++ b/internal/db/schema/migrations/oss/postgres/84/02_wh_upsert_user_refact.up.sql @@ -69,7 +69,7 @@ begin; 'for the user that corresponds to the provided auth_token_id.'; -- Replaces function from 60/03_wh_sessions.up.sql - -- Replaced in 91/06_session_state_tstzrange.up.sql + -- Replaced in 92/02_session_state_tstzrange.up.sql create function wh_insert_session() returns trigger as $$ declare diff --git a/internal/db/schema/migrations/oss/postgres/91/06_session_state_tstzrange.up.sql b/internal/db/schema/migrations/oss/postgres/92/02_session_state_tstzrange.up.sql similarity index 100% rename from internal/db/schema/migrations/oss/postgres/91/06_session_state_tstzrange.up.sql rename to internal/db/schema/migrations/oss/postgres/92/02_session_state_tstzrange.up.sql diff --git a/internal/db/schema/migrations/oss/postgres/91/07_cancel_session_trigger.up.sql b/internal/db/schema/migrations/oss/postgres/92/03_cancel_session_trigger.up.sql similarity index 100% rename from internal/db/schema/migrations/oss/postgres/91/07_cancel_session_trigger.up.sql rename to internal/db/schema/migrations/oss/postgres/92/03_cancel_session_trigger.up.sql