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