Brings the working codebase (Next.js app, auth system, Stripe billing, Docker/deploy config, tests, docs) into version control on top of the placeholder initial commit, and adds account self-deletion (Danger Zone in Settings, password + typed-email confirmation, cascading DB cleanup, Stripe cancellation) per GDPR right-to-erasure. Excludes local build caches, node_modules, and internal agent scratch files; .gitignore hardened to keep those out going forward. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
12 lines
714 B
SQL
12 lines
714 B
SQL
CREATE TABLE "password_reset_tokens" (
|
|
"id" varchar(64) PRIMARY KEY NOT NULL,
|
|
"user_id" varchar(64) NOT NULL,
|
|
"expires_at" timestamp NOT NULL,
|
|
"consumed_at" timestamp,
|
|
"requested_ip_hash" varchar(64),
|
|
"created_at" timestamp DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "password_reset_tokens" ADD CONSTRAINT "password_reset_tokens_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
CREATE INDEX "idx_password_reset_user_id" ON "password_reset_tokens" USING btree ("user_id");--> statement-breakpoint
|
|
CREATE INDEX "idx_password_reset_expires_at" ON "password_reset_tokens" USING btree ("expires_at"); |