Files
thrilltrack-explorer/supabase/migrations/20251010225807_a1fcd3b1-0bd2-49a2-acd0-ccabe9fee7e8.sql
2025-10-11 15:58:56 +00:00

4 lines
266 B
SQL

-- Fix blog_posts foreign key to reference profiles
ALTER TABLE blog_posts DROP CONSTRAINT IF EXISTS blog_posts_author_id_fkey;
ALTER TABLE blog_posts ADD CONSTRAINT blog_posts_author_id_fkey
FOREIGN KEY (author_id) REFERENCES profiles(user_id) ON DELETE CASCADE;