-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (19 loc) · 756 Bytes
/
Makefile
File metadata and controls
28 lines (19 loc) · 756 Bytes
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
include .env
start-dev:
go run main.go
start-prod:
go build -o bin/main main.go
GIN_MODE=release ./bin/main
migrate-create:
migrate create -ext sql -dir $(MIGRATIONS_DIR) -seq $(name)
migrate-up:
migrate -path $(MIGRATIONS_DIR) -database $(DATABASE_URL) -verbose up
migrate-down:
migrate -path $(MIGRATIONS_DIR) -database $(DATABASE_URL) -verbose down $(n)
migrate-down-to:
migrate -path $(MIGRATIONS_DIR) -database $(DATABASE_URL) -verbose goto $(version)
migrate-force:
migrate -path $(MIGRATIONS_DIR) -database $(DATABASE_URL) -verbose force $(version)
migrate-status:
migrate -path $(MIGRATIONS_DIR) -database $(DATABASE_URL) -verbose version
.PHONY: migrate-create migrate-up migrate-down migrate-down-to migrate-force migrate-status