Skip to content

Commit

Permalink
fix(glpi_item): add default value to prevent error when field is not …
Browse files Browse the repository at this point in the history
…filled
  • Loading branch information
stonebuzz committed Jun 8, 2022
1 parent 5a8db84 commit dd88c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/migration.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function getSQLFields(string $field_name, string $field_type): arr
$fields[$field_name] = 'INT NOT NULL DEFAULT 0';
break;
case $field_type === 'glpi_item':
$fields[sprintf('itemtype_%s', $field_name)] = 'varchar(100) NOT NULL';
$fields[sprintf('itemtype_%s', $field_name)] = "varchar(100) NOT NULL DEFAULT ''";
$fields[sprintf('items_id_%s', $field_name)] = "int {$default_key_sign} NOT NULL DEFAULT 0";
break;
case $field_type === 'date':
Expand Down

0 comments on commit dd88c1c

Please sign in to comment.