summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-02-20 09:30:05 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-02-20 09:30:05 +0000
commit0c1c76156e0f5b194efeea4e63b8661b2c825a88 (patch)
treef9f1985865bee53c8d35410922687b706652c8fd /index.php
parent819ac503bae4ccce521d61c95f5c5f006b2ebffa (diff)
downloadwebtrees-0c1c76156e0f5b194efeea4e63b8661b2c825a88.tar.gz
webtrees-0c1c76156e0f5b194efeea4e63b8661b2c825a88.tar.bz2
webtrees-0c1c76156e0f5b194efeea4e63b8661b2c825a88.zip
Move database migration and seeding to a service
Diffstat (limited to 'index.php')
-rw-r--r--index.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.php b/index.php
index 52517ca19c..82421c4aab 100644
--- a/index.php
+++ b/index.php
@@ -31,6 +31,7 @@ use Fisharebest\Webtrees\Http\Middleware\UseTransaction;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Module\ModuleThemeInterface;
use Fisharebest\Webtrees\Module\WebtreesTheme;
+use Fisharebest\Webtrees\Services\MigrationService;
use Fisharebest\Webtrees\Services\ModuleService;
use Fisharebest\Webtrees\Services\TimeoutService;
use Fisharebest\Webtrees\Session;
@@ -107,7 +108,8 @@ try {
Database::createInstance($database_config);
// Update the database schema, if necessary.
- Database::updateSchema('\Fisharebest\Webtrees\Schema', 'WT_SCHEMA_VERSION', Webtrees::SCHEMA_VERSION);
+ app()->make(MigrationService::class)
+ ->updateSchema('\Fisharebest\Webtrees\Schema', 'WT_SCHEMA_VERSION', Webtrees::SCHEMA_VERSION);
} catch (PDOException $exception) {
I18N::init();
if ($exception->getCode() === 1045) {