Skip to content

Commit

Permalink
Add user type to invite and make email unique
Browse files Browse the repository at this point in the history
  • Loading branch information
kavinphan committed Jan 24, 2025
1 parent 88b6f90 commit ea6bbd1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
Warnings:
- A unique constraint covering the columns `[email]` on the table `UserInvite` will be added. If there are existing duplicate values, this will fail.
- Added the required column `userType` to the `UserInvite` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "UserInvite" ADD COLUMN "userType" "UserType" NOT NULL;

-- CreateIndex
CREATE UNIQUE INDEX "UserInvite_email_key" ON "UserInvite"("email");
3 changes: 2 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ model User {
model UserInvite {
id Int @id @default(autoincrement())
token String @unique
email String
userType UserType
email String @unique
expiration DateTime
}

Expand Down

0 comments on commit ea6bbd1

Please sign in to comment.