2023-03-05 23:35:41 +07:00
|
|
|
include .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
|
|
|
|
|
|
|
|
sqlc:
|
|
|
|
sqlc generate
|
|
|
|
|
|
|
|
test:
|
|
|
|
go test -v -cover ./...
|
|
|
|
|
2023-03-07 18:52:37 +07:00
|
|
|
server:
|
|
|
|
go run main.go
|
|
|
|
|
|
|
|
.PHONY: server migrateup migratedown sqlc
|