Ship legacy migrate APIs, portfolio/blog old-id schema, and admin migrate/purge flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-07-29 16:10:41 +03:30
co-authored by Cursor
parent 7244b70e90
commit 4598add88c
32 changed files with 4234 additions and 265 deletions
@@ -0,0 +1,14 @@
-- Link migrated portfolios / media to legacy WillaEngine ids
ALTER TABLE portfolios
ADD COLUMN IF NOT EXISTS old_id BIGINT;
CREATE UNIQUE INDEX IF NOT EXISTS portfolios_business_old_id_unique
ON portfolios (business_id, old_id)
WHERE old_id IS NOT NULL;
ALTER TABLE media
ADD COLUMN IF NOT EXISTS old_id BIGINT;
CREATE UNIQUE INDEX IF NOT EXISTS media_business_old_id_unique
ON media (business_id, old_id)
WHERE old_id IS NOT NULL;