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)'; +