Skip to content

Commit c2483a8

Browse files
committed
fix(glpi_item): add default value to prevent error when field is not filled
1 parent 5a8db84 commit c2483a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/migration.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static function getSQLFields(string $field_name, string $field_type): arr
6767
$fields[$field_name] = 'INT NOT NULL DEFAULT 0';
6868
break;
6969
case $field_type === 'glpi_item':
70-
$fields[sprintf('itemtype_%s', $field_name)] = 'varchar(100) NOT NULL';
70+
$fields[sprintf('itemtype_%s', $field_name)] = 'varchar(100) NOT NULL DEFAULT \'\'';
7171
$fields[sprintf('items_id_%s', $field_name)] = "int {$default_key_sign} NOT NULL DEFAULT 0";
7272
break;
7373
case $field_type === 'date':

0 commit comments

Comments
 (0)