Skip to content

Commit ef19304

Browse files
authored
chore(db): align the drop migration filename with the applied prod version (#251)
Applied to prod after #250 deployed; the MCP restamped it as 20260815210532. Rename so supabase db push does not rerun it, and record that it is already applied.
1 parent 0d3f4e3 commit ef19304

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎supabase/migrations/20260815204334_move_backup_pins_to_service_role_table.sql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ ON CONFLICT (user_id) DO NOTHING;
6767

6868
-- --------------------------------------------------------------------------
6969
-- The `users.backup_pin_hash` column itself is dropped by the NEXT migration,
70-
-- 20260815204400_drop_users_backup_pin_hash.sql. It is deliberately a separate
70+
-- 20260815210532_drop_users_backup_pin_hash.sql. It is deliberately a separate
7171
-- step: this migration is additive and safe to apply to a running deployment,
7272
-- whereas the drop must not land until the application code that stopped
7373
-- reading that column has shipped.

supabase/migrations/20260815204400_drop_users_backup_pin_hash.sql renamed to supabase/migrations/20260815210532_drop_users_backup_pin_hash.sql

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
-- Advisory: GHSA-jpfm-vrpc-p6rr
33
--
44
-- Second half of 20260815204334_move_backup_pins_to_service_role_table.sql.
5-
--
6-
-- NOTE: when this is applied via the Supabase MCP, the ledger will restamp it
7-
-- with its own timestamp. Rename this file to match afterwards, or
8-
-- `supabase db push` will rerun it.
95
-- That migration created the service-role-only `user_backup_pins` table and
106
-- carried across which users have a PIN set. This one removes the column that
117
-- every logged-in account could read via `users_select_authenticated`.
@@ -14,6 +10,11 @@
1410
-- `users.backup_pin_hash` is deployed (src/app/api/auth/backup-pin/route.js).
1511
-- Applying it against the previous release breaks GET/POST /api/auth/backup-pin.
1612
--
13+
-- APPLIED TO PRODUCTION 2026-08-15, after #250 deployed. The ledger restamped it
14+
-- as version 20260815210532 (the Supabase MCP ignores the filename timestamp and
15+
-- records its own), and this file was renamed to match so that
16+
-- `supabase db push` does not rerun it.
17+
--
1718
-- The unsalted SHA-256 digests in this column are discarded rather than
1819
-- migrated: nothing ever verified them server-side, they only backed a boolean,
1920
-- and their whole problem is that they are trivially reversible.

0 commit comments

Comments
 (0)