knex-migrator 5.0.1 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -579,7 +579,7 @@ KnexMigrator.prototype.isDatabaseOK = function isDatabaseOK() {
579
579
  // CASE: if an init script was removed, the health check will be positive (see #48)
580
580
  if (result.init && result.init.expected > result.init.actual) {
581
581
  throw new errors.DatabaseIsNotOkError({
582
- message: 'Please run knex-migrator init',
582
+ message: 'Please run `yarn knex-migrator init`',
583
583
  code: 'DB_NOT_INITIALISED'
584
584
  });
585
585
  }
@@ -588,7 +588,7 @@ KnexMigrator.prototype.isDatabaseOK = function isDatabaseOK() {
588
588
  // CASE: there are more migrations expected than have been run, database needs to be migrated
589
589
  if (value.expected > value.actual) {
590
590
  throw new errors.DatabaseIsNotOkError({
591
- message: 'Migrations are missing. Please run `knex-migrator migrate`.',
591
+ message: 'Migrations are missing. Please run `yarn knex-migrator migrate`.',
592
592
  code: 'DB_NEEDS_MIGRATION',
593
593
  help: `Expected: ${value.expected} items in migrations table, found: ${value.actual}`
594
594
  });
@@ -606,7 +606,7 @@ KnexMigrator.prototype.isDatabaseOK = function isDatabaseOK() {
606
606
  // CASE: database does not exist
607
607
  if (err.errno === 1049) {
608
608
  throw new errors.DatabaseIsNotOkError({
609
- message: 'Please run knex-migrator init',
609
+ message: 'Please run `yarn knex-migrator init`',
610
610
  code: 'DB_NOT_INITIALISED'
611
611
  });
612
612
  }
@@ -1023,7 +1023,7 @@ KnexMigrator.prototype._migrateTo = function _migrateTo(options) {
1023
1023
  message: 'Field length of %field% in %table% is too long!'.replace('%field%', field).replace('%table%', table),
1024
1024
  context: 'This usually happens if your database encoding is utf8mb4.\n' +
1025
1025
  'All unique fields and indexes must be lower than 191 characters.\n' +
1026
- 'Please correct your field length and reset your database with knex-migrator reset.\n',
1026
+ 'Please correct your field length and reset your database with `yarn knex-migrator reset`.\n',
1027
1027
  help: 'Read more here: https://github.com/TryGhost/knex-migrator/issues/51\n',
1028
1028
  err: err
1029
1029
  });
@@ -1180,7 +1180,7 @@ KnexMigrator.prototype._integrityCheck = function _integrityCheck(options) {
1180
1180
  if (toReturn[futureVersion].actual !== toReturn[futureVersion].expected) {
1181
1181
  logging.warn('knex-migrator is skipping ' + futureVersion);
1182
1182
  logging.warn('Current version in MigratorConfig.js is smaller then requested version, use --force to proceed!');
1183
- logging.warn('Please run `knex-migrator migrate --v ' + futureVersion + ' --force` to proceed!');
1183
+ logging.warn('Please run `yarn knex-migrator migrate --v ' + futureVersion + ' --force` to proceed!');
1184
1184
  delete toReturn[futureVersion];
1185
1185
  }
1186
1186
  });
@@ -1200,7 +1200,7 @@ KnexMigrator.prototype._integrityCheck = function _integrityCheck(options) {
1200
1200
  // CASE: database does not exist
1201
1201
  if (err.errno === 1049) {
1202
1202
  throw new errors.DatabaseIsNotOkError({
1203
- message: 'Please run knex-migrator init',
1203
+ message: 'Please run `yarn knex-migrator init`',
1204
1204
  code: 'DB_NOT_INITIALISED'
1205
1205
  });
1206
1206
  }
@@ -1208,7 +1208,7 @@ KnexMigrator.prototype._integrityCheck = function _integrityCheck(options) {
1208
1208
  // CASE: migration table does not exist
1209
1209
  if (err.errno === 1 || err.errno === 1146) {
1210
1210
  throw new errors.DatabaseIsNotOkError({
1211
- message: 'Please run knex-migrator init',
1211
+ message: 'Please run `yarn knex-migrator init`',
1212
1212
  code: 'MIGRATION_TABLE_IS_MISSING'
1213
1213
  });
1214
1214
  }
package/lib/locking.js CHANGED
@@ -61,7 +61,7 @@ module.exports.isLocked = function (connection) {
61
61
  if (!data || !data.length || data[0].locked) {
62
62
  throw new errors.MigrationsAreLockedError({
63
63
  message: 'Migration lock was never released or currently a migration is running.',
64
- help: 'If you are sure no migration is running, check your data and if your database is in a broken state, you could run `knex-migrator rollback`.'
64
+ help: 'If you are sure no migration is running, check your data and if your database is in a broken state, you could run `yarn knex-migrator rollback`.'
65
65
  });
66
66
  }
67
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knex-migrator",
3
- "version": "5.0.1",
3
+ "version": "5.0.4",
4
4
  "description": "Database migrations with knex.",
5
5
  "keywords": [
6
6
  "ghost",
@@ -47,14 +47,14 @@
47
47
  "node": "^14.17.0 || ^16.13.0"
48
48
  },
49
49
  "dependencies": {
50
- "@tryghost/database-info": "0.3.7",
51
- "@tryghost/errors": "1.2.14",
52
- "@tryghost/logging": "2.2.3",
50
+ "@tryghost/database-info": "0.3.9",
51
+ "@tryghost/errors": "1.2.15",
52
+ "@tryghost/logging": "2.2.4",
53
53
  "bluebird": "3.7.2",
54
54
  "commander": "5.1.0",
55
55
  "compare-ver": "2.0.2",
56
56
  "debug": "4.3.4",
57
- "knex": "2.1.0",
57
+ "knex": "2.2.0",
58
58
  "lodash": "4.17.21",
59
59
  "moment": "2.24.0",
60
60
  "mysql2": "2.3.3",
@@ -77,6 +77,6 @@
77
77
  "sinon": "9.2.4"
78
78
  },
79
79
  "optionalDependencies": {
80
- "sqlite3": "5.0.9"
80
+ "sqlite3": "5.0.11"
81
81
  }
82
82
  }