@hogsend/db 0.21.0 → 0.22.0
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.
- package/drizzle/0025_contact_discord_id.sql +2 -0
- package/drizzle/0026_warm_freak.sql +15 -0
- package/drizzle/meta/0025_snapshot.json +3767 -0
- package/drizzle/meta/0026_snapshot.json +3907 -0
- package/drizzle/meta/_journal.json +14 -0
- package/package.json +1 -1
- package/src/schema/connector-link-codes.ts +68 -0
- package/src/schema/contact-aliases.ts +1 -1
- package/src/schema/contacts.ts +13 -0
- package/src/schema/index.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
CREATE TABLE "connector_link_codes" (
|
|
2
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
3
|
+
"connector_id" text NOT NULL,
|
|
4
|
+
"code_hash" text NOT NULL,
|
|
5
|
+
"platform_user_id" text NOT NULL,
|
|
6
|
+
"target_email" text NOT NULL,
|
|
7
|
+
"expires_at" timestamp with time zone NOT NULL,
|
|
8
|
+
"used_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
|
+
CREATE UNIQUE INDEX "connector_link_codes_code_hash_idx" ON "connector_link_codes" USING btree ("code_hash");--> statement-breakpoint
|
|
14
|
+
CREATE INDEX "connector_link_codes_throttle_user_idx" ON "connector_link_codes" USING btree ("connector_id","platform_user_id","created_at");--> statement-breakpoint
|
|
15
|
+
CREATE INDEX "connector_link_codes_throttle_email_idx" ON "connector_link_codes" USING btree ("connector_id","target_email","created_at");
|