-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathschema.prisma
More file actions
50 lines (44 loc) · 1.48 KB
/
schema.prisma
File metadata and controls
50 lines (44 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// ============================================================================
// DATABASE CONFIGURATION
// Using PostgreSQL. Start with: wasp db start
// ============================================================================
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
// ============================================================================
// ENTITIES
// Add your models here. After changes, run: wasp db migrate-dev
// ============================================================================
// User entity - required by Wasp auth
// Add your own fields below the existing ones
model User {
id String @id @default(uuid())
username String @unique
email String @unique
isAdmin Boolean @default(false)
// Timestamps
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
// Add your relations here, e.g.:
// posts Post[]
// comments Comment[]
}
// ============================================================================
// ADD YOUR MODELS BELOW
// Example:
//
// model Post {
// id String @id @default(uuid())
// title String
// content String
// published Boolean @default(false)
// author User @relation(fields: [authorId], references: [id])
// authorId String
// createdAt DateTime @default(now())
// updatedAt DateTime @updatedAt
// }
// ============================================================================