-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (24 loc) · 1.14 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
db-container:
docker run --name school-db --network school-backend -e POSTGRES_USER=root -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres:15
api-container:
docker run --name school-manager-api --network school-backend
createdb:
docker exec -it school-db createdb --username=root --owner=root school
dropdb:
docker exec -it school-db dropdb school
migrationsup:
sea-orm-cli migrate up -u postgres://root:mysecretpassword@localhost:5432/school
migrationslatest:
sea-orm-cli migrate down -u postgres://root:mysecretpassword@localhost:5432/school
migrationsdown:
sea-orm-cli migrate reset -u postgres://root:mysecretpassword@localhost:5432/school
migrationsfresh:
sea-orm-cli migrate fresh -u postgres://root:mysecretpassword@localhost:5432/school
entity:
del /S C:\Users\abdel\OneDrive\Desktop\Projects\Personal\rust\school-management-api\entity\src\*.rs
sea-orm-cli generate entity -o entity/src --lib -u postgres://root:mysecretpassword@localhost:5432/school
server:
cargo run
build:
cargo build --verbose --workspace --release
.PHONY: watch build server createdb dropdb mup mdownlatest mdownall mdownfresh mdownrefresh entity