naise_pos/Makefile
2023-03-16 16:55:23 +07:00

21 lines
600 B
Makefile

include dev.env
migrateup:
migrate -path db/migrations -database "${DB_TYPE}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable" -verbose up
migratedown:
migrate -path db/migrations -database "${DB_TYPE}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable" -verbose down $N
mock-generate:
mockgen -package mockdb -destination db/mock/store.go git.nochill.in/nochill/naice_pos/db/sqlc Store
sqlc:
sqlc generate && make mock-generate
test:
go test -v -cover ./...
server:
go run main.go
.PHONY: server migrateup migratedown sqlc