Skip to content

Commit

Permalink
fix(install): bad argument fordefault values
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jul 18, 2022
1 parent 722158d commit 6f7fbc8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions install/upgrade_to_2.13.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function fixTables() {
$this->migration->migrationOneTable($table);

$table = 'glpi_plugin_formcreator_forms';
$this->migration->changeField($table, 'name', 'name', 'string', ['default' => '']);
$this->migration->changeField($table, 'name', 'name', 'string', ['value' => '']);
$this->migration->migrationOneTable($table);

$table = 'glpi_plugin_formcreator_formanswers';
Expand All @@ -88,15 +88,15 @@ public function fixTables() {
$this->migration->migrationOneTable($table);

$table = 'glpi_plugin_formcreator_questions';
$this->migration->changeField($table, 'name', 'name', 'string', ['default' => '']);
$this->migration->changeField($table, 'name', 'name', 'string', ['value' => '']);
// Assume the content of the 2 following columns is out of date
// because they should have been migrated in version 2.7.0
$this->migration->dropField($table, 'range_min');
$this->migration->dropField($table, 'range_max');
$this->migration->migrationOneTable($table);

$table = 'glpi_plugin_formcreator_sections';
$this->migration->changeField($table, 'name', 'name', 'string', ['default' => '']);
$this->migration->changeField($table, 'name', 'name', 'string', ['value' => '']);
$this->migration->migrationOneTable($table);

$table = 'glpi_plugin_formcreator_targettickets';
Expand All @@ -105,23 +105,23 @@ public function fixTables() {
['destination_entity_value' => '0'],
['destination_entity_value' => null]
);
$this->migration->changeField($table, 'validation_followup', 'validation_followup', 'bool', ['after' => 'urgency_question', 'default' => '1']);
$this->migration->changeField($table, 'destination_entity', 'destination_entity', 'integer', ['after' => 'validation_followup', 'default' => '1']);
$this->migration->changeField($table, 'validation_followup', 'validation_followup', 'bool', ['after' => 'urgency_question', 'value' => '1']);
$this->migration->changeField($table, 'destination_entity', 'destination_entity', 'integer', ['after' => 'validation_followup', 'value' => '1']);
$this->migration->changeField($table, 'destination_entity_value', 'destination_entity_value', 'integer', ['after' => 'destination_entity', 'default' => '1']);
$this->migration->changeField($table, 'tag_type', 'tag_type', 'integer', ['after' => 'destination_entity_value', 'default' => '1']);
$this->migration->changeField($table, 'tag_type', 'tag_type', 'integer', ['after' => 'destination_entity_value', 'value' => '1']);
$this->migration->changeField($table, 'tag_questions', 'tag_questions', 'string', ['after' => 'tag_type']);
$this->migration->changeField($table, 'tag_specifics', 'tag_specifics', 'string', ['after' => 'tag_questions']);
$this->migration->changeField($table, 'category_rule', 'category_rule', 'integer', ['after' => 'tag_specifics', 'default' => '1']);
$this->migration->changeField($table, 'category_rule', 'category_rule', 'integer', ['after' => 'tag_specifics', 'value' => '1']);
$this->migration->changeField($table, 'category_question', 'category_question', 'integer', ['after' => 'category_rule']);
$this->migration->changeField($table, 'associate_rule', 'associate_rule', 'integer', ['after' => 'category_question', 'default' => '1']);
$this->migration->changeField($table, 'associate_rule', 'associate_rule', 'integer', ['after' => 'category_question', 'value' => '1']);
$this->migration->changeField($table, 'associate_question', 'associate_question', 'integer', ['after' => 'associate_rule']);
$this->migration->changeField($table, 'location_rule', 'location_rule', 'integer', ['after' => 'associate_question', 'default' => '1']);
$this->migration->changeField($table, 'location_rule', 'location_rule', 'integer', ['after' => 'associate_question', 'value' => '1']);
$this->migration->changeField($table, 'location_question', 'location_question', 'integer', ['after' => 'location_rule']);
$this->migration->changeField($table, 'show_rule', 'show_rule', 'integer', ['after' => 'location_question', 'default' => '1']);
$this->migration->changeField($table, 'sla_rule', 'sla_rule', 'integer', ['after' => 'show_rule', 'default' => '1']);
$this->migration->changeField($table, 'show_rule', 'show_rule', 'integer', ['after' => 'location_question', 'value' => '1']);
$this->migration->changeField($table, 'sla_rule', 'sla_rule', 'integer', ['after' => 'show_rule', 'value' => '1']);
$this->migration->changeField($table, 'sla_question_tto', 'sla_question_tto', 'integer', ['after' => 'sla_rule']);
$this->migration->changeField($table, 'sla_question_ttr', 'sla_question_ttr', 'integer', ['after' => 'sla_question_tto']);
$this->migration->changeField($table, 'ola_rule', 'ola_rule', 'integer', ['after' => 'sla_question_ttr', 'default' => '1']);
$this->migration->changeField($table, 'ola_rule', 'ola_rule', 'integer', ['after' => 'sla_question_ttr', 'value' => '1']);
$this->migration->changeField($table, 'ola_question_tto', 'ola_question_tto', 'integer', ['after' => 'ola_rule']);
$this->migration->changeField($table, 'ola_question_ttr', 'ola_question_ttr', 'integer', ['after' => 'ola_question_tto']);
$this->migration->changeField($table, 'uuid', 'uuid', 'string', ['after' => 'ola_question_ttr']);
Expand Down

0 comments on commit 6f7fbc8

Please sign in to comment.