0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/core
Daniel Lockyer b788604e15
Added erroring migrations to the final minor of deleted majors
refs https://github.com/TryGhost/Toolbox/issues/300

- the previous commit deleted all v1/v2/v3 migrations
- Ghost-CLI forces you to update to the latest minor in your major
  before you upgrade but people who aren't on the latest minor, who don't
  use Ghost-CLI and try to update to v5 might have missed migrations that
  I've just deleted
- the way to protect against this is to add some migrations for the last
  minor in each major, that will throw an error if they get run
- this uses a feature of knex-migrator where it will always try to
  backfill missing migrations when you run Ghost, so these new migrations
  should _only_ be run if the Ghost DB hasn't already run the same number
  of migrations in that minor
- by throwing an error, it'll cause knex-migrator to fail and the user
  shouldn't be able to update, which is good
- v2 and v3 only have 1 migration so I can just replace that, but v1 has
  2 migrations. I think it makes more sense that the first one errors
  and the second one is a no-op otherwise it'll run the first migration,
  succeed, run the second, error, and then rollback the second and first
  one
- the new migration names are different from the original ones but that
  shouldn't matter because we're not comparing nor storing them
2022-04-28 15:37:10 +01:00
..
client@5751899e5b Updated Admin to v4.46.0 2022-04-28 15:29:18 +01:00
frontend Moved frontend reloading logic into bridge 2022-04-28 15:37:09 +01:00
server Added erroring migrations to the final minor of deleted majors 2022-04-28 15:37:10 +01:00
shared Promoted multiple newsletters UI labs flag to private beta 2022-04-28 10:54:59 +01:00
app.js Fixed express app stacking 2021-12-06 21:28:53 +13:00
boot.js Removed config and bluebird from ghost-server 2022-04-28 15:37:10 +01:00
bridge.js Removed sync method from route settings loader 2022-04-28 15:37:09 +01:00