Skip to content

Commit 4dadea8

Browse files
committed
fix(install): avoid alter table fail
some columns are null and making them not null requires to remove null values
1 parent 7e67d58 commit 4dadea8

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

install/upgrade_to_2.13.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,36 @@ public function fixTables(): void {
138138
['destination_entity_value' => '0'],
139139
['destination_entity_value' => null]
140140
);
141+
$DB->update(
142+
$table,
143+
['sla_question_tto' => '0'],
144+
['sla_question_tto' => null]
145+
);
146+
$DB->update(
147+
$table,
148+
['sla_question_ttr' => '0'],
149+
['sla_question_ttr' => null]
150+
);
151+
$DB->update(
152+
$table,
153+
['ola_question_tto' => '0'],
154+
['ola_question_tto' => null]
155+
);
156+
$DB->update(
157+
$table,
158+
['ola_question_ttr' => '0'],
159+
['ola_question_ttr' => null]
160+
);
161+
$DB->update(
162+
$table,
163+
['sla_rule' => '0'],
164+
['sla_rule' => null]
165+
);
166+
$DB->update(
167+
$table,
168+
['ola_rule' => '0'],
169+
['ola_rule' => null]
170+
);
141171
$this->migration->changeField($table, 'validation_followup', 'validation_followup', 'bool', ['after' => 'urgency_question', 'value' => '1']);
142172
$this->migration->changeField($table, 'destination_entity', 'destination_entity', 'integer', ['after' => 'validation_followup', 'value' => '1']);
143173
$this->migration->changeField($table, 'destination_entity_value', 'destination_entity_value', $unsignedIntType, ['after' => 'destination_entity', 'default' => '1']);

0 commit comments

Comments
 (0)