jp00p / AGIMUS

Discord bot for Friends of Desoto
MIT License
10 stars 9 forks source link

Simplify the migration makefile targets #399

Closed mathew-fleisch closed 1 year ago

mathew-fleisch commented 1 year ago

This change will make it easier to run migration files against docker and kubernetes based mysql deployments. These targets currently assume the user is only one migration behind. This isn't very flexible or realistic in practice. Instead this change will allow the user to set the migration file they want to run by exporting an environment variable first

# Set the migration file to set
export MIGRATION_FILE='./migrations/v1.3.18.sql'

# Run an arbitrary migration sql (docker)
make db-migrate

# Run an arbitrary migration sql (kubernetes)
make helm-db-migrate