From 6e29df1945a5fc3f6498b03b5e55f1675b2fc6c7 Mon Sep 17 00:00:00 2001 From: oguz ozturk Date: Mon, 12 Jan 2026 17:03:23 +0300 Subject: [PATCH] migration: Remove CF account foreign key constraint - CF accounts are managed in Admin Panel (separate database) - cf_account_id is now just a reference ID, not a foreign key --- backend/migrations/remove_cf_account_fk.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 backend/migrations/remove_cf_account_fk.sql diff --git a/backend/migrations/remove_cf_account_fk.sql b/backend/migrations/remove_cf_account_fk.sql new file mode 100644 index 0000000..83a93cd --- /dev/null +++ b/backend/migrations/remove_cf_account_fk.sql @@ -0,0 +1,11 @@ +-- Migration: Remove foreign key constraint on cf_account_id +-- Reason: CF accounts are managed in Admin Panel (separate database) +-- Date: 2026-01-12 + +-- Drop the foreign key constraint +ALTER TABLE domains +DROP CONSTRAINT IF EXISTS domains_cf_account_id_fkey; + +-- Add comment to explain why cf_account_id is not a foreign key +COMMENT ON COLUMN domains.cf_account_id IS 'CF account ID from Admin Panel (not a foreign key - managed in separate database)'; +