Skip to content

Commit b0b1571

Browse files
committed
fix(install): prevent fatal error in migration
1 parent bc255ab commit b0b1571

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install/install.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ public function upgrade(Migration $migration, $args = []): bool {
143143
}
144144
}
145145

146+
$this->migration = $migration;
146147
$oldVersion = Config::getConfigurationValue('formcreator', 'previous_version');
147148
// Force fix of signed columns to reduce upgrade errors frequency
148149
// This assumes that all modified columns exist in the database
@@ -185,7 +186,6 @@ public function upgrade(Migration $migration, $args = []): bool {
185186
}
186187
}
187188

188-
$this->migration = $migration;
189189
if (isset($args['force-upgrade']) && $args['force-upgrade'] === true) {
190190
// Might return false
191191
$fromSchemaVersion = array_search(PLUGIN_FORMCREATOR_SCHEMA_VERSION, $this->upgradeSteps);
@@ -1024,5 +1024,7 @@ protected function migrateFkToUnsignedInt() {
10241024
}
10251025
$this->migration->changeField($table, 'id', 'id', 'int ' . DBConnection::getDefaultPrimaryKeySignOption() . ' not null auto_increment');
10261026
}
1027+
1028+
$this->migration->executeMigration();
10271029
}
10281030
}

0 commit comments

Comments
 (0)