-
Notifications
You must be signed in to change notification settings - Fork 1
/
phinx.php
29 lines (25 loc) · 838 Bytes
/
phinx.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
$envirement = ini_get('yaf.environ');
$filename = ".env.".$envirement.".ini";
$configDict = parse_ini_file($filename);
$default =
[
'paths' => [
'migrations' => './migrations'
],
'environments' => [
'default_migration_table' => 't_migrations',
'default_database' => $envirement,
$envirement => [
'adapter' => $configDict['database.database_type'],
'host' => $configDict['database.server'],
'name' => $configDict['database.database_name'],
'user' => $configDict['database.username'],
'pass' => $configDict['database.password'],
'port' => $configDict['database.port'],
'charset' => $configDict['database.charset'],
],
],
'version_order' => 'creation'
];
return $default;