Skip to content

Commit

Permalink
Merge branch 'release/2.13.0-alpha.3' into support/2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jan 31, 2022
2 parents b82ef34 + 328a614 commit 34b230f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions install/upgrade_to_2.12.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class PluginFormcreatorUpgradeTo2_12 {
* @param Migration $migration
*/
public function upgrade(Migration $migration) {
global $DB;

$this->migration = $migration;

// Convert datetime to timestamp
Expand Down Expand Up @@ -64,6 +66,7 @@ public function upgrade(Migration $migration) {
$this->migration->addField($table, 'changetemplates_id', 'integer', ['value' => '0', 'after' => 'target_name']);

$table = 'glpi_plugin_formcreator_targettickets';
$DB->query("UPDATE `$table` SET `tickettemplates_id`='0' WHERE `tickettemplates_id` IS NULL");
$this->migration->changeField($table, 'tickettemplates_id', 'tickettemplates_id', 'integer', ['value' => '0', 'after' => 'type_question']);
}

Expand Down

0 comments on commit 34b230f

Please sign in to comment.