-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
40 lines (27 loc) · 1.26 KB
/
Makefile
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
include .env
export
PRISMA_SCHEMA="--schema=./src/database/schema.prisma"
db-generate:
DATABASE_URL=${DATABASE_PROXY_URL} PRISMA_CLIENT_ENGINE_TYPE='dataproxy' yarn prisma generate
db-migrate:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma migrate deploy
db-status:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma migrate status --preview-feature ${PRISMA_SCHEMA}
db-migrate-dev:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma migrate dev --name init ${PRISMA_SCHEMA}
db-deploy:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma deploy
db-pull:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma db pull ${PRISMA_SCHEMA}
db-push:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma db push
db-studio:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma studio ${PRISMA_SCHEMA}
db-tbd:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma migrate deploy ${PRISMA_SCHEMA}
db-seed:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma db seed
db-reset:
DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma migrate reset --force --preview-feature && DATABASE_URL=${DATABASE_MIGRATE_URL} yarn prisma migrate deploy --preview-feature
# Got an error when using db-reset, "The table 'public.User' does not exist in the current database
# seemed to work to do db-migrate, db-push, db-pull