@spfn/auth 0.3.0-beta.20 → 0.3.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ CREATE TABLE "spfn_auth"."key_revoke_all_tokens" (
2
+ "id" bigserial PRIMARY KEY,
3
+ "user_id" bigint NOT NULL,
4
+ "token_hash" text NOT NULL,
5
+ "key_epoch" integer NOT NULL,
6
+ "expires_at" timestamp with time zone NOT NULL,
7
+ "consumed_at" timestamp with time zone,
8
+ "superseded_at" timestamp with time zone,
9
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
10
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
11
+ );
12
+ --> statement-breakpoint
13
+ ALTER TABLE "spfn_auth"."users" ADD COLUMN "key_epoch" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
14
+ CREATE UNIQUE INDEX "key_revoke_all_token_hash_idx" ON "spfn_auth"."key_revoke_all_tokens" ("token_hash");--> statement-breakpoint
15
+ CREATE INDEX "key_revoke_all_user_id_idx" ON "spfn_auth"."key_revoke_all_tokens" ("user_id");--> statement-breakpoint
16
+ CREATE INDEX "key_revoke_all_expires_at_idx" ON "spfn_auth"."key_revoke_all_tokens" ("expires_at");--> statement-breakpoint
17
+ ALTER TABLE "spfn_auth"."key_revoke_all_tokens" ADD CONSTRAINT "key_revoke_all_tokens_user_id_users_id_fkey" FOREIGN KEY ("user_id") REFERENCES "spfn_auth"."users"("id") ON DELETE CASCADE;