55// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
66
77generator client {
8- provider = " prisma-client-js "
8+ provider = " prisma-client-js "
9+ previewFeatures = [" multiSchema " ]
910}
1011
1112datasource db {
1213 provider = " postgresql "
1314 url = env (" DATABASE_URL " )
15+ schemas = [" openresume " ]
1416}
1517
1618model Account {
@@ -30,6 +32,7 @@ model Account {
3032 user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
3133
3234 @@unique ([provider , providerAccountId ] )
35+ @@schema (" openresume " )
3336}
3437
3538model Session {
@@ -38,6 +41,8 @@ model Session {
3841 userId String
3942 expires DateTime
4043 user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
44+
45+ @@schema (" openresume " )
4146}
4247
4348model User {
@@ -60,6 +65,8 @@ model User {
6065 company Company [] // One-to-many relationship with Company, work experience. Can be multiple companies.
6166 education Education [] // One-to-many relationship with Education, education history. Can be multiple schools.
6267 Social Social [] // One-to-many relationship with Social, social media links or usernames.
68+
69+ @@schema (" openresume " )
6370}
6471
6572model VerificationToken {
@@ -68,6 +75,7 @@ model VerificationToken {
6875 expires DateTime
6976
7077 @@unique ([identifier , token ] )
78+ @@schema (" openresume " )
7179}
7280
7381// Social media links for a user, e.g. "Twitter", "GitHub", "LinkedIn"
@@ -81,6 +89,8 @@ model Social {
8189 url String
8290 user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
8391 userId String
92+
93+ @@schema (" openresume " )
8494}
8595
8696// Skill is a general skill that can be used by multiple users, e.g. "HTML", "CSS", "JavaScript"
@@ -90,6 +100,8 @@ model Skill {
90100 name String @unique // Ensures skill names are unique
91101 icon String ? // Optional icon, e.g., from Iconify.
92102 skillForUser SkillForUser [] // One-to-many relationship with SkillForUser
103+
104+ @@schema (" openresume " )
93105}
94106
95107// SkillForUser is a specific skill that a user has, e.g. "HTML", "CSS", "JavaScript", with additional
@@ -108,6 +120,7 @@ model SkillForUser {
108120 skillForProject SkillForProject []
109121
110122 @@unique ([userId , skillId ] ) // Ensures that a user cannot repeat the same skill
123+ @@schema (" openresume " )
111124}
112125
113126// SkillForProject is a specific skill that a user has for a specific project, e.g. "HTML", "CSS", "JavaScript",
@@ -122,6 +135,7 @@ model SkillForProject {
122135 projectId String
123136
124137 @@unique ([skillForUserId , projectId ] ) // Ensures that a user cannot repeat the same skill for the same project
138+ @@schema (" openresume " )
125139}
126140
127141// Project is a project that a user has worked on, e.g. "Personal Portfolio", "Company Website", and is specific
@@ -134,6 +148,8 @@ model Project {
134148 position Position @relation (fields : [positionId ] , references : [id ] )
135149 positionId String
136150 sortIndex Int @default (0 ) // Used for sorting projects.
151+
152+ @@schema (" openresume " )
137153}
138154
139155// Position is a position that a user has worked in, e.g. "Software Engineer", "Product Manager", and is specific
@@ -147,6 +163,8 @@ model Position {
147163 projects Project []
148164 company Company ? @relation (fields : [companyId ] , references : [id ] )
149165 companyId String
166+
167+ @@schema (" openresume " )
150168}
151169
152170// Company is a company that a user has worked at, e.g. "Google", "Facebook", and is specific to the context within
@@ -160,6 +178,8 @@ model Company {
160178 positions Position []
161179 user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
162180 userId String
181+
182+ @@schema (" openresume " )
163183}
164184
165185// Education is a school that a user has attended, e.g. "Harvard University", "Stanford University", and is specific
@@ -171,4 +191,6 @@ model Education {
171191 dateAwarded DateTime ?
172192 user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
173193 userId String
194+
195+ @@schema (" openresume " )
174196}
0 commit comments