|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
use BZIon\Composer\ScriptHandler; |
|
4
|
|
|
|
|
5
|
1 |
|
require("vendor/autoload.php"); |
|
6
|
|
|
|
|
7
|
1 |
|
$config = ScriptHandler::getDatabaseConfig(); |
|
8
|
1 |
|
$testConfig = ScriptHandler::getDatabaseConfig(true); |
|
9
|
|
|
|
|
10
|
|
|
return array( |
|
11
|
1 |
|
'paths' => array( |
|
12
|
|
|
'migrations' => __DIR__ . '/migrations' |
|
13
|
|
|
), |
|
14
|
|
|
'environments' => array( |
|
15
|
1 |
|
'default_migration_table' => 'migration_log', |
|
16
|
1 |
|
'default_database' => 'main', |
|
17
|
|
|
'main' => array( |
|
18
|
1 |
|
'adapter' => 'mysql', |
|
19
|
1 |
|
'host' => $config['host'], |
|
20
|
1 |
|
'name' => $config['database'], |
|
21
|
1 |
|
'user' => $config['username'], |
|
22
|
1 |
|
'pass' => $config['password'] |
|
23
|
|
|
), |
|
24
|
1 |
|
'test' => ($testConfig) ? array( |
|
25
|
1 |
|
'adapter' => 'mysql', |
|
26
|
1 |
|
'host' => $testConfig['host'], |
|
27
|
1 |
|
'name' => $testConfig['database'], |
|
28
|
1 |
|
'user' => $testConfig['username'], |
|
29
|
1 |
|
'pass' => $testConfig['password'] |
|
30
|
|
|
) : null |
|
31
|
|
|
) |
|
32
|
|
|
); |
|
33
|
|
|
|