Release v1.0.0
This commit is contained in:
15
server/drizzle/0007_sudden_roland_deschain.sql
Normal file
15
server/drizzle/0007_sudden_roland_deschain.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
CREATE TYPE "public"."account_token_type" AS ENUM('EMAIL_VERIFICATION', 'PASSWORD_RESET');--> statement-breakpoint
|
||||
CREATE TABLE "account_action_tokens" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"user_id" uuid NOT NULL,
|
||||
"type" "account_token_type" NOT NULL,
|
||||
"token_hash" 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
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "account_action_tokens" ADD CONSTRAINT "account_action_tokens_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "account_action_tokens_hash_unique" ON "account_action_tokens" USING btree ("token_hash");--> statement-breakpoint
|
||||
CREATE INDEX "account_action_tokens_user_type_idx" ON "account_action_tokens" USING btree ("user_id","type");--> statement-breakpoint
|
||||
CREATE INDEX "account_action_tokens_expiry_idx" ON "account_action_tokens" USING btree ("expires_at");
|
||||
Reference in New Issue
Block a user