Skip to content

Commit

Permalink
fix sqlite dsn parcing
Browse files Browse the repository at this point in the history
  • Loading branch information
antedebaas committed Jul 6, 2024
1 parent 5e68b23 commit 2ab9dd1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Controller/SetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ public function index(Request $request, UserPasswordHasherInterface $userPasswor
$migrations = array();
}

$parsedDsn = parse_url($this->params->get('app.database_url'));
$is_sqlite = preg_match("/^(sqlite):\/\/.*\w/", $this->params->get('app.database_url'), $matches);
if($is_sqlite) {
$parsedDsn = parse_url($this->params->get('app.database_url'));
$parsedDsn['scheme'] = 'sqlite';
} else {
$parsedDsn = parse_url($this->params->get('app.database_url'));
}

$migrationfiles = array();
$finder = new Finder();
Expand Down

0 comments on commit 2ab9dd1

Please sign in to comment.