From cac1c7eb310803f39815bb0d9756dd7e25c9bffb Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sat, 7 Sep 2019 08:44:58 +0800 Subject: [PATCH] Remove old update scripts --- .../update_scripts/update-3.0.1-to-3.0.2.php | 19 ----------- .../update_scripts/update-3.0.3-to-3.0.4.php | 12 ------- .../update_scripts/update-3.1-to-3.1.1.php | 15 -------- .../update_scripts/update-3.1.2-to-3.2.0.php | 26 -------------- .../update_scripts/update-3.3.2-to-3.4.0.php | 9 ----- .../update_scripts/update-3.4.0-to-3.5.0.php | 34 ------------------- .../update_scripts/update-4.0.4-to-4.1.1.php | 20 ----------- .../update_scripts/update-4.1.3-to-4.1.4.php | 8 ----- .../update_scripts/update-4.2.1-to-4.3.6.php | 7 ---- .../update_scripts/update-4.3.6-to-4.3.7.php | 7 ---- 10 files changed, 157 deletions(-) delete mode 100644 database/update_scripts/update-3.0.1-to-3.0.2.php delete mode 100644 database/update_scripts/update-3.0.3-to-3.0.4.php delete mode 100644 database/update_scripts/update-3.1-to-3.1.1.php delete mode 100644 database/update_scripts/update-3.1.2-to-3.2.0.php delete mode 100644 database/update_scripts/update-3.3.2-to-3.4.0.php delete mode 100644 database/update_scripts/update-3.4.0-to-3.5.0.php delete mode 100644 database/update_scripts/update-4.0.4-to-4.1.1.php delete mode 100644 database/update_scripts/update-4.1.3-to-4.1.4.php delete mode 100644 database/update_scripts/update-4.2.1-to-4.3.6.php delete mode 100644 database/update_scripts/update-4.3.6-to-4.3.7.php diff --git a/database/update_scripts/update-3.0.1-to-3.0.2.php b/database/update_scripts/update-3.0.1-to-3.0.2.php deleted file mode 100644 index 52babb4d..00000000 --- a/database/update_scripts/update-3.0.1-to-3.0.2.php +++ /dev/null @@ -1,19 +0,0 @@ - '0', - 'version' => '', - 'check_update' => '1', - 'update_source' => 'github', -]; - -foreach ($options as $key => $value) { - Option::set($key, $value); -} - -Option::set('version', '3.0.2'); diff --git a/database/update_scripts/update-3.0.3-to-3.0.4.php b/database/update_scripts/update-3.0.3-to-3.0.4.php deleted file mode 100644 index b9676fb4..00000000 --- a/database/update_scripts/update-3.0.3-to-3.0.4.php +++ /dev/null @@ -1,12 +0,0 @@ - $value) { - if ($value === 'true' || $value === 'false') { - $option = option($key); - - if ($option === '0' || $option === '1') { - Option::set([$key => ($option === '0' ? 'false' : 'true')]); - } - } -} - -Option::set('version', '3.2.0'); - -return [ - 'v3.2 新加入了插件系统,支持的插件请去程序发布帖查看', -]; diff --git a/database/update_scripts/update-3.3.2-to-3.4.0.php b/database/update_scripts/update-3.3.2-to-3.4.0.php deleted file mode 100644 index 3323f904..00000000 --- a/database/update_scripts/update-3.3.2-to-3.4.0.php +++ /dev/null @@ -1,9 +0,0 @@ - true]); - $msg[] = '【数据库】升级成功!现在你可以正常使用 v3.5.0 内置的用户邮箱验证功能了'; -} catch (Exception $e) { - $msg[] = '【数据库】更新数据表失败,错误信息:'.$e->getMessage(); - $msg[] = '【数据库】这并不影响 v3.5.0 的基本功能,你可以参考 这篇文章 手动升级你的数据库'; -} - -$plugins_enabled = (array) json_decode(option('plugins_enabled'), true); - -if (in_array('data-integration', $plugins_enabled)) { - $plugins_enabled = '["data-integration"]'; - $msg[] = '【数据对接】原有的数据对接插件已经不再维护,并且有可能在 v3.5.0 上出现奇怪的问题'; - $msg[] = '【数据对接】请参考 这篇文章 升级你的数据对接插件'; -} else { - $plugins_enabled = ''; -} - -$msg[] = '【插件系统】升级程序已经自动禁用了所有已安装的插件,因为这些插件的版本可能过旧'; -$msg[] = '【插件系统】请在后台的「插件市场」页面升级你的所有插件,确保其为最新版后再启用它们'; -$msg[] = '【插件系统】在 v3.5.0 上强行启用旧版的插件可能造成无法预知的问题!'; - -option(['plugins_enabled' => $plugins_enabled]); -option(['return_204_when_notfound' => option('return_404_when_notfound')]); -option(['version' => config('app.version')]); - -$msg[] = '【升级成功】升级完成后请【务必】清空你的浏览器缓存,否则可能会出现奇怪的问题'; -$msg[] = '【升级成功】使用愉快!查看完整更新日志'; - -return $msg; diff --git a/database/update_scripts/update-4.0.4-to-4.1.1.php b/database/update_scripts/update-4.0.4-to-4.1.1.php deleted file mode 100644 index b8f869b4..00000000 --- a/database/update_scripts/update-4.0.4-to-4.1.1.php +++ /dev/null @@ -1,20 +0,0 @@ -resolveCommands([\Laravel\Passport\Console\KeysCommand::class]); -}); - -$tips = []; - -Artisan::call('jwt:secret', ['--no-interaction' => true]); -Artisan::call('migrate', ['--force' => true]); -try { - Artisan::call('passport:keys', ['--no-interaction' => true]); -} catch (\Exception $e) { - $tips[] = nl2br(implode("\n", [ - '您需要打开终端或 PowerShell 来执行这条命令:php artisan passport:keys', - 'You need to open terminal or PowerShell and execute: php artisan passport:keys', - ])); -} - -return $tips; diff --git a/database/update_scripts/update-4.1.3-to-4.1.4.php b/database/update_scripts/update-4.1.3-to-4.1.4.php deleted file mode 100644 index 94679eee..00000000 --- a/database/update_scripts/update-4.1.3-to-4.1.4.php +++ /dev/null @@ -1,8 +0,0 @@ -php artisan migrate --force', - 'php artisan bs:migrate-v4:likes', -]; diff --git a/database/update_scripts/update-4.2.1-to-4.3.6.php b/database/update_scripts/update-4.2.1-to-4.3.6.php deleted file mode 100644 index 613addeb..00000000 --- a/database/update_scripts/update-4.2.1-to-4.3.6.php +++ /dev/null @@ -1,7 +0,0 @@ -php artisan migrate --force', -]; diff --git a/database/update_scripts/update-4.3.6-to-4.3.7.php b/database/update_scripts/update-4.3.6-to-4.3.7.php deleted file mode 100644 index 613addeb..00000000 --- a/database/update_scripts/update-4.3.6-to-4.3.7.php +++ /dev/null @@ -1,7 +0,0 @@ -php artisan migrate --force', -];