Skip to content

Commit

Permalink
fix(install): reorder key changes on conditions table
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Dec 16, 2019
1 parent bf4b6d9 commit 701abee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install/upgrade_to_2.9.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,10 @@ public function upgrade(Migration $migration) {
}
$migration->migrationOneTable($table);
$migration->changeField($table, 'show_field', 'plugin_formcreator_questions_id', 'integer', ['value' => '0', 'comment' => 'question to test for the condition']);
$migration->addKey($table, ['plugin_formcreator_questions_id']);
$migration->dropKey($table, 'plugin_formcreator_questions_id');
$migration->addKey($table, ['itemtype', 'items_id']);
$migration->migrationOneTable($table);
$migration->addKey($table, ['plugin_formcreator_questions_id']);
$migration->addKey($table, ['itemtype', 'items_id'], 'item');
$migration->addPostQuery("UPDATE `$table` SET `itemtype` = 'plugin_formcreator_question' WHERE `itemtype` = ''");

// Remove show_condition enum for conditions
Expand Down

0 comments on commit 701abee

Please sign in to comment.