Fix blog post foreign key

This commit is contained in:
gpt-engineer-app[bot]
2025-10-10 23:00:04 +00:00
parent 6127f902e9
commit bc08d44f4c
5 changed files with 41 additions and 32 deletions

View File

@@ -0,0 +1,4 @@
-- 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;