Commit 98f2248 1 parent bd938a1 commit 98f2248 Copy full SHA for 98f2248
File tree 2 files changed +11
-0
lines changed
apps/api/src/infra/prisma
migrations/20250118105345_migration
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ -- CreateEnum
2
+ CREATE TYPE "UserRole " AS ENUM (' USER' , ' OCCUPIER' );
3
+
4
+ -- AlterTable
5
+ ALTER TABLE " users" ADD COLUMN " role" " UserRole" NOT NULL DEFAULT ' USER' ;
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ datasource db {
10
10
extensions = [pgvector (map : " vector " , schema : " public " ) ]
11
11
}
12
12
13
+ enum UserRole {
14
+ USER
15
+ OCCUPIER
16
+ }
17
+
13
18
enum LostAndFoundState {
14
19
NONE
15
20
DELIVERING
@@ -22,6 +27,7 @@ model User {
22
27
hashedFingerprintId String ? @unique @map (" hashed_fingerprint_id " ) @db.Char (64 )
23
28
name String @map (" name " ) @db.VarChar (64 )
24
29
email String @map (" email " ) @db.VarChar (320 )
30
+ role UserRole @default (USER )
25
31
lostAndFoundState LostAndFoundState @default (NONE ) @map (" lost_and_found_state " )
26
32
avatarUrl String @map (" avatar_url " )
27
33
You can’t perform that action at this time.
0 commit comments