Fix that OAuth tables not created at installation (fix #72)

This commit is contained in:
Pig Fang 2019-06-30 23:25:48 +08:00
parent 1edb4ac824
commit a69bafd915
4 changed files with 16 additions and 2 deletions

View File

@ -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'));

View File

@ -12,3 +12,4 @@
## Fixed
- Fixed that possible duplicated signings.
- Fixed that OAuth tables not created at installation.

View File

@ -12,3 +12,4 @@
## 修复
- 修复可能存在的重复签到问题
- 修复安装皮肤站时未创建 OAuth 相关数据表的问题

View File

@ -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();