Skip to content
Joram van den Boezem edited this page Jun 1, 2017 · 1 revision

Works like this

  • startup.sh runs startup.d/50-run-migrations.sh
  • startup.d/50-run-migrations.sh runs migrate.sh and logs output
  • migrate.sh iterates all files in /migrations/ folder in alphabetical order and
    • checks whether the filename is already in the .migrated (could be moved to sqlite later) file and if not,
    • executes the file (see notes below), and
    • saves the filename in the .migrated file

Important note

Migration files should be prefixed by the date the file is created (to be able to re-run migrations in order if needed) and should contain a shebang so it can be executed automatically.

Clone this wiki locally