CREATE TABLE "deletion_requests" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "user_id" uuid NOT NULL, "reason" text, "actioned_at" timestamp with time zone, "created_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE TABLE "notification_preferences" ( "user_id" uuid PRIMARY KEY NOT NULL, "sms_new_request" boolean DEFAULT true NOT NULL, "sms_booking_reminder" boolean DEFAULT true NOT NULL, "sms_marketing" boolean DEFAULT false NOT NULL, "email_receipts" boolean DEFAULT true NOT NULL, "email_marketing" boolean DEFAULT false NOT NULL, "push_messages" boolean DEFAULT true NOT NULL, "push_requests" boolean DEFAULT true NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint ALTER TABLE "deletion_requests" ADD CONSTRAINT "deletion_requests_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint ALTER TABLE "notification_preferences" ADD CONSTRAINT "notification_preferences_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;