Marked the client auth table drop migration as irreversible

no issue

- bumps `knex-migrator` so it supports irreversible migrations
- marks the `03-drop-client-auth` migration as irreversible because it destroys data that is not recoverable and is required for earlier versions of Ghost to function
This commit is contained in:
Kevin Ansfield 2019-09-23 17:22:30 +01:00
parent 6d0f19ebfa
commit 3eb11533bd
3 changed files with 10 additions and 6 deletions

View File

@ -6,6 +6,10 @@ const tables = [
'clients'
];
module.exports.config = {
irreversible: true
};
module.exports.up = (options) => {
const connection = options.connection;
@ -26,5 +30,5 @@ module.exports.up = (options) => {
// the schemas for the deleted tables no longer exist so there's nothing for
// `commands.createTable` to draw from for the table structure
module.exports.down = () => {
return Promise.resolve();
return Promise.reject();
};

View File

@ -89,7 +89,7 @@
"jsonwebtoken": "8.5.1",
"keypair": "1.0.1",
"knex": "0.19.4",
"knex-migrator": "3.3.3",
"knex-migrator": "3.4.0",
"lodash": "4.17.15",
"markdown-it": "9.1.0",
"markdown-it-footnote": "3.0.2",

View File

@ -4675,10 +4675,10 @@ kind-of@^6.0.0, kind-of@^6.0.2:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==
knex-migrator@3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/knex-migrator/-/knex-migrator-3.3.3.tgz#a080f98ff3b6947d9a6ea7af427f744971f388d3"
integrity sha512-GPKxmI9jeQlFLMHGZktM7fjckm0W+RUHN4SIq4lms40jNw9XiPK9LH0biUczIeM0hevqEFWEdfbbKU5zLVgaBw==
knex-migrator@3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/knex-migrator/-/knex-migrator-3.4.0.tgz#c110236fb1efe1c3b46d4bd7521abeae80df7497"
integrity sha512-Ay9Fpo/lxRQlibCT5dNaiyG49Jw4oSMdbm6fqf7BwriRkBwuQKyteSNVqAIhGMg0WdRjCeeBLoGlnwVXU/5QsA==
dependencies:
bluebird "^3.5.3"
commander "^2.19.0"