Skip to content

Commit 4d30c71

Browse files
committed
fix: 🐛 restore table
1 parent f1c9fc4 commit 4d30c71

5 files changed

Lines changed: 1203 additions & 5 deletions

File tree

src/components/availability/invite-members-dialog.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,7 @@ export function InviteMembersDialog({
208208
)}
209209

210210
<div>
211-
<Typography
212-
variant="caption"
213-
color="textSecondary"
214-
className="mb-4"
215-
>
211+
<Typography variant="caption" color="textSecondary">
216212
Or Share Invite Link
217213
</Typography>
218214
<div className="flex items-center gap-2">
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
CREATE TABLE IF NOT EXISTS "meeting_invite_responses" (
2+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3+
"invite_id" uuid NOT NULL,
4+
"user_id" text NOT NULL,
5+
"email" text NOT NULL,
6+
"status" "invite_status" DEFAULT 'pending' NOT NULL,
7+
"responded_at" timestamp,
8+
CONSTRAINT "meeting_invite_responses_invite_user_unique" UNIQUE("invite_id","user_id")
9+
);
10+
--> statement-breakpoint
11+
DO $$ BEGIN
12+
ALTER TABLE "meeting_invite_responses" ADD CONSTRAINT "meeting_invite_responses_invite_id_meeting_invites_id_fk" FOREIGN KEY ("invite_id") REFERENCES "public"."meeting_invites"("id") ON DELETE cascade ON UPDATE no action;
13+
EXCEPTION
14+
WHEN duplicate_object THEN null;
15+
END $$;
16+
--> statement-breakpoint
17+
DO $$ BEGIN
18+
ALTER TABLE "meeting_invite_responses" ADD CONSTRAINT "meeting_invite_responses_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
19+
EXCEPTION
20+
WHEN duplicate_object THEN null;
21+
END $$;

0 commit comments

Comments
 (0)