fix: [db schema] fixed

pull/8216/head
iglocska 2022-03-04 16:10:12 +01:00
parent b32684561e
commit 870b9d761b
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 11 additions and 8 deletions

View File

@ -86,7 +86,7 @@ class AppModel extends Model
63 => true, 64 => false, 65 => false, 66 => false, 67 => false, 68 => false,
69 => false, 70 => false, 71 => true, 72 => true, 73 => false, 74 => false,
75 => false, 76 => true, 77 => false, 78 => false, 79 => false, 80 => false,
81 => false
81 => false, 82 => false
);
public $advanced_updates_description = array(
@ -1633,12 +1633,15 @@ class AppModel extends Model
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;";
break;
case 81:
$fields = ['nationality', 'sector', 'type', 'name', 'description'];
$fields = ['nationality', 'sector', 'type', 'name'];
foreach ($fields as $field) {
$sqlArray[] = sprintf("UPDATE organisations SET %s = '' WHERE %s IS NULL;", $field, $field);
$sqlArray[] = sprintf("ALTER table organisations MODIFY %s varchar(255) NOT NULL DEFAULT '';", $field);
}
break;
case 82:
$sqlArray[] = sprintf("ALTER table organisations MODIFY description text;");
break;
case 'fixNonEmptySharingGroupID':
$sqlArray[] = 'UPDATE `events` SET `sharing_group_id` = 0 WHERE `distribution` != 4;';
$sqlArray[] = 'UPDATE `attributes` SET `sharing_group_id` = 0 WHERE `distribution` != 4;';

View File

@ -4236,13 +4236,13 @@
},
{
"column_name": "description",
"is_nullable": "NO",
"data_type": "varchar",
"character_maximum_length": "255",
"is_nullable": "YES",
"data_type": "text",
"character_maximum_length": "65535",
"numeric_precision": null,
"collation_name": "utf8_bin",
"column_type": "varchar(255)",
"column_default": "",
"column_type": "text",
"column_default": null,
"extra": ""
},
{
@ -8322,5 +8322,5 @@
"id": true
}
},
"db_version": "81"
"db_version": "82"
}