@@ 50-58 (lines=9) @@ | ||
47 | $dbConfig = config("database.connections.{$dbConnectionName}"); |
|
48 | ||
49 | switch ($dbConfig['driver']) { |
|
50 | case 'mysql': |
|
51 | return MySql::create() |
|
52 | ->setHost($dbConfig['host']) |
|
53 | ->setDbName($dbConfig['database']) |
|
54 | ->setUserName($dbConfig['username']) |
|
55 | ->setPassword($dbConfig['password']) |
|
56 | ->setDumpBinaryPath(isset($dbConfig['dump_command_path']) ? $dbConfig['dump_command_path'] : '') |
|
57 | ->setTimeout(isset($dbConfig['dump_command_timeout']) ? $dbConfig['dump_command_timeout'] : null); |
|
58 | break; |
|
59 | ||
60 | case 'pgsql': |
|
61 | return PostgreSql::create() |
|
@@ 60-68 (lines=9) @@ | ||
57 | ->setTimeout(isset($dbConfig['dump_command_timeout']) ? $dbConfig['dump_command_timeout'] : null); |
|
58 | break; |
|
59 | ||
60 | case 'pgsql': |
|
61 | return PostgreSql::create() |
|
62 | ->setHost($dbConfig['host']) |
|
63 | ->setDbName($dbConfig['database']) |
|
64 | ->setUserName($dbConfig['username']) |
|
65 | ->setPassword($dbConfig['password']) |
|
66 | ->setDumpBinaryPath(isset($dbConfig['dump_command_path']) ? $dbConfig['dump_command_path'] : '') |
|
67 | ->setTimeout(isset($dbConfig['dump_command_timeout']) ? $dbConfig['dump_command_timeout'] : null); |
|
68 | break; |
|
69 | ||
70 | default : |
|
71 | throw InvalidConfiguration::cannotUseUnsupportedDriver($dbConnectionName, $dbConfig['driver']); |