Skip to content

Commit 701abee

Browse files
committed
fix(install): reorder key changes on conditions table
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent bf4b6d9 commit 701abee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

install/upgrade_to_2.9.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,10 @@ public function upgrade(Migration $migration) {
291291
}
292292
$migration->migrationOneTable($table);
293293
$migration->changeField($table, 'show_field', 'plugin_formcreator_questions_id', 'integer', ['value' => '0', 'comment' => 'question to test for the condition']);
294-
$migration->addKey($table, ['plugin_formcreator_questions_id']);
295294
$migration->dropKey($table, 'plugin_formcreator_questions_id');
296-
$migration->addKey($table, ['itemtype', 'items_id']);
295+
$migration->migrationOneTable($table);
296+
$migration->addKey($table, ['plugin_formcreator_questions_id']);
297+
$migration->addKey($table, ['itemtype', 'items_id'], 'item');
297298
$migration->addPostQuery("UPDATE `$table` SET `itemtype` = 'plugin_formcreator_question' WHERE `itemtype` = ''");
298299

299300
// Remove show_condition enum for conditions

0 commit comments

Comments
 (0)