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`);