We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb529e0 commit 4ecb095Copy full SHA for 4ecb095
3 files changed
drizzle/0064_relay.sql
@@ -0,0 +1,12 @@
1
+CREATE TYPE "public"."relay_state" AS ENUM('idle', 'pending', 'accepted', 'rejected');--> statement-breakpoint
2
+CREATE TABLE "relays" (
3
+ "relay_server_actor_id" uuid,
4
+ "state" "relay_state" DEFAULT 'idle' NOT NULL,
5
+ "follow_request_id" text NOT NULL,
6
+ "inbox_url" text PRIMARY KEY NOT NULL,
7
+ "relay_client_actor_id" uuid NOT NULL,
8
+ CONSTRAINT "relays_follow_request_id_unique" UNIQUE("follow_request_id")
9
+);
10
+--> statement-breakpoint
11
+ALTER TABLE "relays" ADD CONSTRAINT "relays_relay_server_actor_id_accounts_id_fk" FOREIGN KEY ("relay_server_actor_id") REFERENCES "public"."accounts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
12
+ALTER TABLE "relays" ADD CONSTRAINT "relays_relay_client_actor_id_accounts_id_fk" FOREIGN KEY ("relay_client_actor_id") REFERENCES "public"."accounts"("id") ON DELETE cascade ON UPDATE no action;
0 commit comments