mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 14:13:37 +08:00
Installer: Fix models not being ready for use when running migrations
This was a regression after the recent introduction of a new migration that actually uses models. Maybe we should change this. See https://discuss.flarum.org/d/2023-can-t-manage-to-install-the-development-version-503-service-unavailable/8
This commit is contained in:
parent
e3f6092c32
commit
03db2b4cc0
|
@ -161,16 +161,16 @@ class InstallCommand extends AbstractCommand
|
||||||
|
|
||||||
$this->storeConfiguration();
|
$this->storeConfiguration();
|
||||||
|
|
||||||
|
$resolver = $this->application->make('Illuminate\Database\ConnectionResolverInterface');
|
||||||
|
AbstractModel::setConnectionResolver($resolver);
|
||||||
|
AbstractModel::setEventDispatcher($this->application->make('events'));
|
||||||
|
|
||||||
$this->runMigrations();
|
$this->runMigrations();
|
||||||
|
|
||||||
$this->writeSettings();
|
$this->writeSettings();
|
||||||
|
|
||||||
$this->application->register('Flarum\Core\CoreServiceProvider');
|
$this->application->register('Flarum\Core\CoreServiceProvider');
|
||||||
|
|
||||||
$resolver = $this->application->make('Illuminate\Database\ConnectionResolverInterface');
|
|
||||||
AbstractModel::setConnectionResolver($resolver);
|
|
||||||
AbstractModel::setEventDispatcher($this->application->make('events'));
|
|
||||||
|
|
||||||
$this->seedGroups();
|
$this->seedGroups();
|
||||||
$this->seedPermissions();
|
$this->seedPermissions();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user