From 333d1610fad10e70759545f223959503288a02c6 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Thu, 10 Jul 2025 19:34:31 +0000
Subject: feat: Add invite user support

---
 packages/db/drizzle/0056_user_invites.sql | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 packages/db/drizzle/0056_user_invites.sql

(limited to 'packages/db/drizzle/0056_user_invites.sql')

diff --git a/packages/db/drizzle/0056_user_invites.sql b/packages/db/drizzle/0056_user_invites.sql
new file mode 100644
index 00000000..5ea38cca
--- /dev/null
+++ b/packages/db/drizzle/0056_user_invites.sql
@@ -0,0 +1,12 @@
+CREATE TABLE `invites` (
+	`id` text PRIMARY KEY NOT NULL,
+	`email` text NOT NULL,
+	`token` text NOT NULL,
+	`createdAt` integer NOT NULL,
+	`expiresAt` integer NOT NULL,
+	`usedAt` integer,
+	`invitedBy` text NOT NULL,
+	FOREIGN KEY (`invitedBy`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `invites_token_unique` ON `invites` (`token`);
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

