Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r--lib/private/Setup.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 9b604895468..795c8cabcea 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -353,11 +353,9 @@ class Setup {
$this->config->setValues($newConfigValues);
+ $dbSetup->initialize($options);
try {
- $dbSetup->initialize($options);
$dbSetup->setupDatabase($username);
- // apply necessary migrations
- $dbSetup->runMigrations();
} catch (\OC\DatabaseSetupException $e) {
$error[] = [
'error' => $e->getMessage(),
@@ -371,6 +369,16 @@ class Setup {
];
return $error;
}
+ try {
+ // apply necessary migrations
+ $dbSetup->runMigrations();
+ } catch (Exception $e) {
+ $error[] = [
+ 'error' => 'Error while trying to initialise the database: ' . $e->getMessage(),
+ 'hint' => '',
+ ];
+ return $error;
+ }
//create the user and group
$user = null;