Skip to content

Commit e5340e7

Browse files
committed
feat(invite-workspace): ran migrations
1 parent f52b669 commit e5340e7

File tree

3 files changed

+2095
-1
lines changed

3 files changed

+2095
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
CREATE TABLE "workspace_invitation" (
2+
"id" text PRIMARY KEY NOT NULL,
3+
"workspace_id" text NOT NULL,
4+
"email" text NOT NULL,
5+
"inviter_id" text NOT NULL,
6+
"role" text DEFAULT 'member' NOT NULL,
7+
"status" text DEFAULT 'pending' NOT NULL,
8+
"token" text NOT NULL,
9+
"expires_at" timestamp NOT NULL,
10+
"created_at" timestamp DEFAULT now() NOT NULL,
11+
"updated_at" timestamp DEFAULT now() NOT NULL,
12+
CONSTRAINT "workspace_invitation_token_unique" UNIQUE("token")
13+
);
14+
--> statement-breakpoint
15+
ALTER TABLE "workspace_invitation" ADD CONSTRAINT "workspace_invitation_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
16+
ALTER TABLE "workspace_invitation" ADD CONSTRAINT "workspace_invitation_inviter_id_user_id_fk" FOREIGN KEY ("inviter_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;

0 commit comments

Comments
 (0)