mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
backup support zip
This commit is contained in:
@@ -241,7 +241,10 @@ class Install
|
||||
$settings = require $defaultSettingsFile;
|
||||
$settingsFromDb = [];
|
||||
if (NexusDB::hasTable('settings') && Setting::query()->count() > 0) {
|
||||
$settingsFromDb = get_setting();
|
||||
if (!NexusDB::hasColumn('settings', 'autoload')) {
|
||||
$this->runMigrate('database/migrations/2022_05_06_191830_add_autoload_to_settings_table.php');
|
||||
}
|
||||
$settingsFromDb = Setting::getFromDb();
|
||||
}
|
||||
$this->doLog("settings form db: " . json_encode($settingsFromDb));
|
||||
foreach ($settings as $prefix => &$group) {
|
||||
@@ -542,6 +545,9 @@ class Install
|
||||
if (!NexusDB::hasTable('settings')) {
|
||||
$this->runMigrate('database/migrations/2021_06_08_113437_create_settings_table.php');
|
||||
}
|
||||
if (!NexusDB::hasColumn('settings', 'autoload')) {
|
||||
$this->runMigrate('database/migrations/2022_05_06_191830_add_autoload_to_settings_table.php');
|
||||
}
|
||||
foreach ($settings as $prefix => $group) {
|
||||
$this->doLog("[SAVE SETTING], prefix: $prefix, nameAndValues: " . json_encode($group));
|
||||
saveSetting($prefix, $group);
|
||||
|
||||
Reference in New Issue
Block a user