Skip to content

Commit ea6bbd1

Browse files
committed
Add user type to invite and make email unique
1 parent 88b6f90 commit ea6bbd1

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
Warnings:
3+
4+
- A unique constraint covering the columns `[email]` on the table `UserInvite` will be added. If there are existing duplicate values, this will fail.
5+
- Added the required column `userType` to the `UserInvite` table without a default value. This is not possible if the table is not empty.
6+
7+
*/
8+
-- AlterTable
9+
ALTER TABLE "UserInvite" ADD COLUMN "userType" "UserType" NOT NULL;
10+
11+
-- CreateIndex
12+
CREATE UNIQUE INDEX "UserInvite_email_key" ON "UserInvite"("email");

prisma/schema.prisma

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ model User {
2828
model UserInvite {
2929
id Int @id @default(autoincrement())
3030
token String @unique
31-
email String
31+
userType UserType
32+
email String @unique
3233
expiration DateTime
3334
}
3435

0 commit comments

Comments
 (0)