diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index 5740aca5..d566812c 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -145,7 +145,13 @@ class SetupController extends Controller Artisan::call('passport:keys', ['--no-interaction' => true]); // Create tables - Artisan::call('migrate', ['--force' => true]); + Artisan::call('migrate', [ + '--force' => true, + '--path' => [ + 'database/migrations', + 'vendor/laravel/passport/database/migrations' + ] + ]); Log::info('[SetupWizard] Tables migrated.'); Option::set('site_name', $request->input('site_name')); diff --git a/resources/misc/changelogs/en/4.3.0.md b/resources/misc/changelogs/en/4.3.0.md index b056817d..9d4d1435 100644 --- a/resources/misc/changelogs/en/4.3.0.md +++ b/resources/misc/changelogs/en/4.3.0.md @@ -12,3 +12,4 @@ ## Fixed - Fixed that possible duplicated signings. +- Fixed that OAuth tables not created at installation. diff --git a/resources/misc/changelogs/zh_CN/4.3.0.md b/resources/misc/changelogs/zh_CN/4.3.0.md index 4bcbd7a9..07619384 100644 --- a/resources/misc/changelogs/zh_CN/4.3.0.md +++ b/resources/misc/changelogs/zh_CN/4.3.0.md @@ -12,3 +12,4 @@ ## 修复 - 修复可能存在的重复签到问题 +- 修复安装皮肤站时未创建 OAuth 相关数据表的问题 diff --git a/tests/SetupControllerTest.php b/tests/SetupControllerTest.php index 8dfe8585..36ae0554 100644 --- a/tests/SetupControllerTest.php +++ b/tests/SetupControllerTest.php @@ -175,7 +175,13 @@ class SetupControllerTest extends TestCase ->once() ->andReturn(true); Artisan::shouldReceive('call') - ->with('migrate', ['--force' => true]) + ->with('migrate', [ + '--force' => true, + '--path' => [ + 'database/migrations', + 'vendor/laravel/passport/database/migrations' + ] + ]) ->once() ->andReturnUsing(function () { $migration = new CreateAllTables();