Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions drizzle/0064_relay.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CREATE TYPE "public"."relay_state" AS ENUM('idle', 'pending', 'accepted', 'rejected');--> statement-breakpoint
CREATE TABLE "relays" (
"relay_server_actor_id" uuid,
"state" "relay_state" DEFAULT 'idle' NOT NULL,
"follow_request_id" text NOT NULL,
"inbox_url" text PRIMARY KEY NOT NULL,
"relay_client_actor_id" uuid NOT NULL,
CONSTRAINT "relays_follow_request_id_unique" UNIQUE("follow_request_id")
);
--> statement-breakpoint
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
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;
2 changes: 1 addition & 1 deletion drizzle/meta/0062_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -2833,4 +2833,4 @@
"schemas": {},
"tables": {}
}
}
}
Loading
Loading