Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BEGIN;

ALTER INDEX IF EXISTS attempts_pkey RENAME TO deliveries_pkey;
ALTER INDEX IF EXISTS attempts_default_pkey RENAME TO deliveries_default_pkey;

COMMIT;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
BEGIN;

-- =============================================================================
-- Migration: Rename the stale deliveries_* primary key indexes to attempts_*
--
-- 000005 renamed the deliveries tables to attempts, but Postgres does not
-- rename dependent indexes and constraints on a table rename, so the primary
-- key of attempts (and of its default partition) still carries the old name.
--
-- Indexes renamed:
-- deliveries_pkey -> attempts_pkey
-- deliveries_default_pkey -> attempts_default_pkey
-- =============================================================================

ALTER INDEX IF EXISTS deliveries_pkey RENAME TO attempts_pkey;
ALTER INDEX IF EXISTS deliveries_default_pkey RENAME TO attempts_default_pkey;

COMMIT;
Loading