-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 1.01 KB
/
Makefile
File metadata and controls
28 lines (23 loc) · 1.01 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
usage:
@cat Makefile
# Create a migration from any changes to prisma/schema.prisma, apply it to DATABASE_URL, and re-generate code.
migrate:
go run github.com/prisma/prisma-client-go migrate dev --preview-feature
# Generate the Go language bindings for the schema.
generate:
go run github.com/prisma/prisma-client-go generate
# Reset DATABASE_URL (deleting all data), then apply all migrations.
reset:
go run github.com/prisma/prisma-client-go migrate reset --preview-feature
# Run the application locally.
run:
go run .
# Docker commands - same as above, but running inside a docker container.
docker-run:
docker run -it --network="host" -v ${PWD}:/scheduler -w /scheduler golang:1.16.3 make run
docker-reset:
docker run -it --network="host" -v ${PWD}:/scheduler -w /scheduler golang:1.16.3 make reset
docker-generate:
docker run -it --network="host" -v ${PWD}:/scheduler -w /scheduler golang:1.16.3 make generate
docker-migrate:
docker run -it --network="host" -v ${PWD}:/scheduler -w /scheduler golang:1.16.3 make migrate