cleanup check

This commit is contained in:
xiaomlove
2024-03-23 04:51:59 +08:00
parent 9f211df038
commit 287302df7f
17 changed files with 207 additions and 9 deletions

View File

@@ -309,7 +309,8 @@ class Update extends Install
/**
* @since 1.8.3
*/
if (NexusDB::hasTable('settings')) {
$hasTableSetting = NexusDB::hasTable('settings');
if ($hasTableSetting) {
$updateSettings = [];
if (get_setting("system.meilisearch_enabled") == 'yes') {
$updateSettings["enabled"] = "yes";
@@ -322,6 +323,16 @@ class Update extends Install
}
}
/**
* @since 1.8.10
*/
if ($hasTableSetting) {
Setting::query()->firstOrCreate(
["name" => "system.alarm_email_receiver"],
["value" => User::query()->where("class", User::CLASS_STAFF_LEADER)->first(["id"])->id]
);
}
}
public function runExtraMigrate()