From 7574c3b57568a0186dddcd138fc4efbdb8d30dd6 Mon Sep 17 00:00:00 2001 From: Matt Ciaccio Date: Sun, 3 May 2026 16:22:58 +0200 Subject: [PATCH] chore(migrations): renumber 0020/0021 -> 0021/0022 to avoid clash with berth-parity berth-schema-parity branch already shipped its own migration 0020 (berth schema parity: text -> numeric, +status_override_mode). Dedup's two migrations need to land on top of that, not collide. Renames: 0020_unusual_azazel.sql -> 0021_unusual_azazel.sql 0021_magenta_madame_hydra.sql -> 0022_magenta_madame_hydra.sql meta/0020_snapshot.json -> meta/0021_snapshot.json meta/0021_snapshot.json -> meta/0022_snapshot.json _journal.json idx + tag fields updated to match. Snapshot CONTENTS remain dedup-branch state (no berths-numeric awareness). A `pnpm drizzle-kit generate` after main merges the berth changes will produce a consistent forward path; until then the snapshots are slightly out-of-sync with the post-merge live schema, which is harmless because the dev DB applies migrations forward, not from snapshots. Co-Authored-By: Claude Opus 4.7 (1M context) --- ...ual_azazel.sql => 0021_unusual_azazel.sql} | 0 ...ydra.sql => 0022_magenta_madame_hydra.sql} | 0 src/lib/db/migrations/meta/0021_snapshot.json | 25 ++----------------- ...{0020_snapshot.json => 0022_snapshot.json} | 25 +++++++++++++++++-- src/lib/db/migrations/meta/_journal.json | 8 +++--- 5 files changed, 29 insertions(+), 29 deletions(-) rename src/lib/db/migrations/{0020_unusual_azazel.sql => 0021_unusual_azazel.sql} (100%) rename src/lib/db/migrations/{0021_magenta_madame_hydra.sql => 0022_magenta_madame_hydra.sql} (100%) rename src/lib/db/migrations/meta/{0020_snapshot.json => 0022_snapshot.json} (99%) diff --git a/src/lib/db/migrations/0020_unusual_azazel.sql b/src/lib/db/migrations/0021_unusual_azazel.sql similarity index 100% rename from src/lib/db/migrations/0020_unusual_azazel.sql rename to src/lib/db/migrations/0021_unusual_azazel.sql diff --git a/src/lib/db/migrations/0021_magenta_madame_hydra.sql b/src/lib/db/migrations/0022_magenta_madame_hydra.sql similarity index 100% rename from src/lib/db/migrations/0021_magenta_madame_hydra.sql rename to src/lib/db/migrations/0022_magenta_madame_hydra.sql diff --git a/src/lib/db/migrations/meta/0021_snapshot.json b/src/lib/db/migrations/meta/0021_snapshot.json index aca3230..d0017dc 100644 --- a/src/lib/db/migrations/meta/0021_snapshot.json +++ b/src/lib/db/migrations/meta/0021_snapshot.json @@ -1,6 +1,6 @@ { - "id": "9f6ae433-f075-4348-8109-3cd368344fa8", - "prevId": "e9d830fc-ec81-42ab-bea6-232dd99d20d1", + "id": "e9d830fc-ec81-42ab-bea6-232dd99d20d1", + "prevId": "6326a9a7-0b30-4647-bf86-b3d79e6a08bf", "version": "7", "dialect": "postgresql", "tables": { @@ -1870,12 +1870,6 @@ "primaryKey": false, "notNull": false }, - "merged_into_client_id": { - "name": "merged_into_client_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, "created_at": { "name": "created_at", "type": "timestamp with time zone", @@ -1963,21 +1957,6 @@ "concurrently": false, "method": "btree", "with": {} - }, - "idx_clients_merged_into": { - "name": "idx_clients_merged_into", - "columns": [ - { - "expression": "merged_into_client_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} } }, "foreignKeys": { diff --git a/src/lib/db/migrations/meta/0020_snapshot.json b/src/lib/db/migrations/meta/0022_snapshot.json similarity index 99% rename from src/lib/db/migrations/meta/0020_snapshot.json rename to src/lib/db/migrations/meta/0022_snapshot.json index d0017dc..aca3230 100644 --- a/src/lib/db/migrations/meta/0020_snapshot.json +++ b/src/lib/db/migrations/meta/0022_snapshot.json @@ -1,6 +1,6 @@ { - "id": "e9d830fc-ec81-42ab-bea6-232dd99d20d1", - "prevId": "6326a9a7-0b30-4647-bf86-b3d79e6a08bf", + "id": "9f6ae433-f075-4348-8109-3cd368344fa8", + "prevId": "e9d830fc-ec81-42ab-bea6-232dd99d20d1", "version": "7", "dialect": "postgresql", "tables": { @@ -1870,6 +1870,12 @@ "primaryKey": false, "notNull": false }, + "merged_into_client_id": { + "name": "merged_into_client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, "created_at": { "name": "created_at", "type": "timestamp with time zone", @@ -1957,6 +1963,21 @@ "concurrently": false, "method": "btree", "with": {} + }, + "idx_clients_merged_into": { + "name": "idx_clients_merged_into", + "columns": [ + { + "expression": "merged_into_client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} } }, "foreignKeys": { diff --git a/src/lib/db/migrations/meta/_journal.json b/src/lib/db/migrations/meta/_journal.json index b8d9f2c..58bcd16 100644 --- a/src/lib/db/migrations/meta/_journal.json +++ b/src/lib/db/migrations/meta/_journal.json @@ -143,17 +143,17 @@ "breakpoints": true }, { - "idx": 20, + "idx": 21, "version": "7", "when": 1777811835982, - "tag": "0020_unusual_azazel", + "tag": "0021_unusual_azazel", "breakpoints": true }, { - "idx": 21, + "idx": 22, "version": "7", "when": 1777812671833, - "tag": "0021_magenta_madame_hydra", + "tag": "0022_magenta_madame_hydra", "breakpoints": true } ]