-
Notifications
You must be signed in to change notification settings - Fork 89
/
Makefile
30 lines (22 loc) · 798 Bytes
/
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
# Set up tools.
install:
go install github.com/cosmtrek/[email protected]
go install github.com/pressly/goose/v3/cmd/[email protected]
# Start dev server.
start:
air
# Set up database.
setup_db:
./bin/init_db.sh
# Migrate scheme to database.
migrate_schema_up:
goose -dir=db/migrations/ mysql "root:root@tcp(127.0.0.1:3306)/golang_clean_architecture" up
migrate_schema_down:
goose -dir=db/migrations/ mysql "root:root@tcp(127.0.0.1:3306)/golang_clean_architecture" down
migrate_schema_reset:
goose -dir=db/migrations/ mysql "root:root@tcp(127.0.0.1:3306)/golang_clean_architecture" reset
migrate_schema_status:
goose -dir=db/migrations/ mysql "root:root@tcp(127.0.0.1:3306)/golang_clean_architecture" status
seed:
go run ./cmd/seed/main.go
.PHONY: install setup_db start migrate_schema seed