Skip to content
Open
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
23 changes: 23 additions & 0 deletions backend/data/drop_dead_tables.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- Migration: Phase 1 schema cleanup — drop confirmed-dead tables
--
-- See docs/schema-redesign.md for the full evaluation. These two tables are the
-- only "safe now" deletions: both have 0 rows, 0 inbound foreign keys, and no
-- references in any application code (frontend or backend).
--
-- public.product_pages — superseded by youtube_shorts as the public showcase
-- page; never referenced anywhere. 0 rows.
-- public.matches — v1 of the matching pipeline; replaced by
-- product_creator_matches. Only a coincidental dict
-- key "matches" exists in code, no table calls. 0 rows.
--
-- Verified pre-drop (2026-05-31): both tables 0 rows, 0 inbound FK constraints.
--
-- Status: applied to the live DB via Supabase MCP on 2026-05-31.
-- Idempotent: uses IF EXISTS.

drop table if exists public.product_pages;
drop table if exists public.matches;

-- Note: public.matches depends on the match_status enum. The enum is left in
-- place (harmless if unused); drop separately only if confirmed unused elsewhere:
-- drop type if exists match_status;