diff --git a/Makefile b/Makefile index 452e84c..cd5a18f 100644 --- a/Makefile +++ b/Makefile @@ -22,12 +22,17 @@ clean: go clean 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" 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 all: build run clean ensure-bin-dir