mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
fix migrate searchbox
This commit is contained in:
@@ -259,7 +259,16 @@ class Update extends Install
|
||||
/**
|
||||
* @since 1.8.0
|
||||
*/
|
||||
$shouldMigrateSearchBox = false;
|
||||
if (!NexusDB::hasColumn('searchbox', 'section_name')) {
|
||||
$shouldMigrateSearchBox = true;
|
||||
} else {
|
||||
$columnInfo = NexusDB::getMysqlColumnInfo('searchbox', 'section_name');
|
||||
if ($columnInfo['DATA_TYPE'] != 'json') {
|
||||
$shouldMigrateSearchBox = true;
|
||||
}
|
||||
}
|
||||
if ($shouldMigrateSearchBox) {
|
||||
$this->runMigrate('database/migrations/2022_09_05_230532_add_mode_to_section_related.php');
|
||||
$this->runMigrate('database/migrations/2022_09_06_004318_add_section_name_to_searchbox_table.php');
|
||||
$this->runMigrate('database/migrations/2022_09_06_030324_change_searchbox_field_extra_to_json.php');
|
||||
@@ -267,6 +276,7 @@ class Update extends Install
|
||||
$searchBoxRep->migrateToModeRelated();
|
||||
$this->doLog("[MIGRATE_TAXONOMY_TO_MODE_RELATED]");
|
||||
}
|
||||
$this->removeMenu(['catmanage.php']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user