Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz committed Jun 8, 2022
1 parent 7993d30 commit 2fdfc4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/container.class.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class %%CLASSNAME%% extends CommonDBTM
if ($DB->numrows($result) > 0) {
while ($data = $DB->fetchAssoc($result)) {
//set default value for type 'glpi_item'
if (str_starts_with($data['Field'], 'itemtype_')) {
if (str_starts_with($data['Field'], 'itemtype_') && $data['Default'] != 'NULL') {
$migration->changeField($table, $data['Field'], $data['Field'], "varchar(100) DEFAULT NULL");
$migration->migrationOneTable(self::getTable());
}
Expand Down

0 comments on commit 2fdfc4d

Please sign in to comment.