mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
8 lines
242 B
SQL
8 lines
242 B
SQL
-- Link migrated blogs to legacy WillaEngine article ids
|
|
ALTER TABLE blogs
|
|
ADD COLUMN IF NOT EXISTS old_id BIGINT;
|
|
|
|
CREATE UNIQUE INDEX IF NOT EXISTS blogs_business_old_id_unique
|
|
ON blogs (business_id, old_id)
|
|
WHERE old_id IS NOT NULL;
|