split resetdb makefile target in downdb & updb
This commit is contained in:
parent
faa77e7970
commit
33f404fa20
13
Makefile
13
Makefile
@ -22,12 +22,17 @@ clean:
|
|||||||
go clean
|
go clean
|
||||||
rm -f $(BINARY_NAME)
|
rm -f $(BINARY_NAME)
|
||||||
|
|
||||||
resetdb:
|
downdb:
|
||||||
goose -dir ./db/migrations postgres "host=$(DBHOST) port=$(DBPORT) user=$(DBUSER) password=$(DBPASS) dbname=$(DBNAME) sslmode=disable" down
|
goose -dir ./db/migrations postgres "host=$(DBHOST) port=$(DBPORT) user=$(DBUSER) password=$(DBPASS) dbname=$(DBNAME) sslmode=disable" down
|
||||||
goose -dir ./db/migrations postgres "host=$(DBHOST) port=$(DBPORT) user=$(DBUSER) password=$(DBPASS) dbname=$(DBNAME) sslmode=disable" up
|
|
||||||
goose -dir ./db/migrations postgres "host=$(DBHOST) port=$(DBPORT) user=$(DBUSER) password=$(DBPASS) dbname=$(DBNAME) sslmode=disable" status
|
|
||||||
|
|
||||||
.PHONY: build run clean ensure-bin-dir resetdb
|
updb:
|
||||||
|
goose -dir ./db/migrations postgres "host=$(DBHOST) port=$(DBPORT) user=$(DBUSER) password=$(DBPASS) dbname=$(DBNAME) sslmode=disable" up
|
||||||
|
|
||||||
|
resetdb:
|
||||||
|
make downdb
|
||||||
|
make updb
|
||||||
|
|
||||||
|
.PHONY: build run clean ensure-bin-dir resetdb downdb updb
|
||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
all: build run clean ensure-bin-dir
|
all: build run clean ensure-bin-dir
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user