Files
query-orchestration/scripts/database.yml
T
Michael McGuinness dd2eebf13a Merged in feature/testingopts (pull request #129)
Testing Options and Clean Up

* bitsandbobs

* lint

* healthchecks

* imgintests

* singlegenerate

* testclean

* network

* networkclean

* cmds
2025-05-03 01:16:53 +00:00

39 lines
865 B
YAML

---
# https://taskfile.dev
version: "3"
vars:
MIGRATIONS: "internal/database/migrations"
includes:
compose:
dir: "{{.CONTEXT}}"
taskfile: local-deployments.yml
internal: true
tasks:
generate:
run: once
cmds:
- task: compose:up:generate
- migrate -path {{.MIGRATIONS}} -database {{.DB_URI_GENERATE}} up
- sqlc generate --file sqlc.yml
lint:
cmds:
- task: compose:up:generate
- sqlc vet --file sqlc.yml
- |
exit 0
for file in internal/database/migrations/*.sql; do
if [[ -f "$file" ]]; then
sqlcheck -c -f $file -r 3 # move to 1
fi
done
mig:create:
cmds:
- |
read -p "Migration Name: " name
test -z "$name" && echo "Error: Name is required." && exit 1
migrate create -ext sql -dir {{.MIGRATIONS}} $name