mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
🐛 Fixed migration path from pre 2.28.x to 3.0.0 (#11268)
no issue - Bug reported here https://forum.ghost.org/t/ghost-3-0-update-q-install-cannot-read-property-type-of-undefined/9659/3 - The issue happens when migrating from e.g. 2.28.x Ghost instance directly to 3.0
This commit is contained in:
parent
80e1530f7e
commit
b1e20d2ad5
1 changed files with 9 additions and 1 deletions
|
@ -13,7 +13,15 @@ function createColumnMigration({table, column, dbIsInCorrectState, operation, op
|
|||
log(`${operationVerb} ${table}.${column}`);
|
||||
|
||||
if (!isInCorrectState) {
|
||||
return operation(table, column, transacting);
|
||||
// has to be passed directly in case of migration to 3.0
|
||||
// ref: https://github.com/TryGhost/Ghost/commit/9d7190d69255ac011848c6bf654886be81abeedc#diff-c20cac44dad77922cf53ffd7b094cd8cL22
|
||||
const columnSpec = {
|
||||
type: 'bool',
|
||||
nullable: false,
|
||||
defaultTo: false
|
||||
};
|
||||
|
||||
return operation(table, column, transacting, columnSpec);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue