Skip to content

Commit

Permalink
accept dashed-string in DSN in phinx.php
Browse files Browse the repository at this point in the history
sosuke-ito committed Oct 25, 2016
1 parent 92453c2 commit 91ae375
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/files/phinx.php
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@

preg_match("/(.*?):(.*)/", $_ENV['DB_DSN'], $parts);
$type = $parts[1];
preg_match("/host=(\w+)/", $_ENV['DB_DSN'], $parts);
preg_match("/host=([^;]+)/", $_ENV['DB_DSN'], $parts);
$host = $parts[1];
preg_match("/dbname=(\w+)/", $_ENV['DB_DSN'], $parts);
preg_match("/dbname=([^;]+)/", $_ENV['DB_DSN'], $parts);
$dbName = $parts[1];

$default = [

0 comments on commit 91ae375

Please sign in to comment.