mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 14:11:13 -05:00
Fix: Correct foreign key constraint for reviews
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
-- Drop existing foreign key that points to auth.users
|
||||
ALTER TABLE public.reviews
|
||||
DROP CONSTRAINT IF EXISTS reviews_user_id_fkey;
|
||||
|
||||
-- Add new foreign key constraint pointing to profiles.user_id
|
||||
ALTER TABLE public.reviews
|
||||
ADD CONSTRAINT reviews_user_id_fkey
|
||||
FOREIGN KEY (user_id)
|
||||
REFERENCES public.profiles(user_id)
|
||||
ON DELETE CASCADE;
|
||||
Reference in New Issue
Block a user