new command for refresh migration

This commit is contained in:
nochill 2023-09-20 13:36:47 +07:00
parent 902247b6ed
commit 8809aa18ce

View File

@ -8,6 +8,10 @@ migratedown:
migrate -path db/migrations -database "${DB_TYPE}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable" -verbose down $n
migrate -path db/migrations -database "${DB_TYPE}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}_test?sslmode=disable" -verbose down $n
migraterestart:
$(MAKE) migratedown
$(MAKE) migrateup
seed:
./import_csv.sh
@ -23,4 +27,4 @@ test:
server:
go run main.go
.PHONY: server migrateup migratedown sqlc
.PHONY: server migrateup migratedown sqlc migraterestart