MiniappGoService/Taskfile.yaml

20 lines
514 B
YAML

version: '3'
tasks:
startApp:
cmds:
- clear
- godotenv -f ./configs/.env go run ./cmd/main.go
createMigration:
cmds:
- migrate create -ext sql -dir ./migrations -seq {{.TITLE}}
upMigrations:
cmds:
- migrate -database "postgres://{{.LOGIN}}:{{.PASSWORD}}@{{.HOST}}/{{.NAME}}?sslmode=disable" -path ./migrations up
downMigration:
cmds:
- migrate -database "postgres://{{.LOGIN}}:{{.PASSWORD}}@{{.HOST}}/{{.NAME}}?sslmode=disable" -path ./migrations down 1