Skip to content

Commit

Permalink
Merge pull request #3 from sosuke-ito/update-phinx-dsn-config
Browse files Browse the repository at this point in the history
accept dashed-string in DSN
  • Loading branch information
koriym authored Oct 25, 2016
2 parents 92453c2 + 91ae375 commit e4d5f81
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
Expand Up @@ -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 = [
Expand Down

0 comments on commit e4d5f81

Please sign in to comment.