Various fixes.
This commit is contained in:
parent
4e4b77ca84
commit
02360be75b
20 changed files with 3137 additions and 3124 deletions
|
@ -78,7 +78,7 @@ async function migrateBase(knex) {
|
|||
// The original Mailtrain migration is executed before this one. So here we check whether the original migration
|
||||
// ended where it should have and we take it from there.
|
||||
const row = await knex('settings').where({key: 'db_schema_version'}).first('value');
|
||||
if (!row || Number(row.value) !== 33) {
|
||||
if (!row || Number(row.value) !== 34) {
|
||||
throw new Error('Unsupported DB schema version: ' + row.value);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
exports.up = (knex, Promise) => (async() => {
|
||||
// This is to provide upgrade path to stable to those that already have beta installed.
|
||||
await knex.schema.raw('ALTER TABLE `custom_fields` ADD COLUMN `help` text AFTER `name`');
|
||||
try {
|
||||
await knex.schema.raw('ALTER TABLE `custom_fields` ADD COLUMN `help` text AFTER `name`');
|
||||
} catch (err) {
|
||||
if (err.code === 'ER_DUP_FIELDNAME') {
|
||||
// The field is already there, so we can ignore this error
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
exports.down = (knex, Promise) => (async() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue