CREATE TABLE "email_change_requests" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "user_id" uuid NOT NULL, "email" text NOT NULL, "token" text NOT NULL, "expires_at" timestamp with time zone NOT NULL, "consumed_at" timestamp with time zone, "created_at" timestamp with time zone DEFAULT now() NOT NULL, CONSTRAINT "email_change_requests_token_unique" UNIQUE("token") ); --> statement-breakpoint ALTER TABLE "email_change_requests" ADD CONSTRAINT "email_change_requests_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;