Ghost/core/server/data/migrations/hooks/init
kirrg001 23b4fd26c6 Moved knex-migrator execution into Ghost
refs #9742, refs https://github.com/TryGhost/Ghost-CLI/issues/759

- required a reordering of Ghost's bootstrap file, because:
  - we have to ensure that no database queries are executed within Ghost during the migrations
  - make 3 sections: check if db needs initialisation, bootstrap Ghost with minimal components (db/models, express apps, load settings+theme)
- create a new `migrator` utility, which tells you which state your db is in and offers an API to execute knex-migrator based on this state
- ensure we still detect an incompatible db: you connect your 2.0 blog with a 0.11 database
- enable maintenance mode if migrations are missing
- if the migration have failed, knex-migrator roll auto rollback
  - you can automatically switch to 1.0 again
- added socket communication for the CLI
2018-08-16 12:13:24 +02:00
..
before.js knex-migrator v2 (#7605) 2016-11-07 11:39:49 +00:00
index.js Bump knex-migrator to version 3.1.1 (#9199) 2017-12-05 09:14:55 +01:00
shutdown.js Moved knex-migrator execution into Ghost 2018-08-16 12:13:24 +02:00