mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 06:51:12 -05:00
4 lines
266 B
SQL
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; |