-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphinx.php
35 lines (31 loc) · 932 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
30
31
32
33
34
35
<?php
require_once __DIR__ . '/bootstrap/app.php';
if (! isset($container)) {
/*
* The container will be available if we run as phinx,
* but must be defined as a global when we run a PHPUnit test
*/
global $container;
}
$config = $container['settings']['database'];
return [
'paths' => [
'migrations' => 'Database/Migrations'
],
'migration_base_class' => 'App\Database\Migrations\Migration',
'templates' => [
'file' => 'app/Database/Migrations/MigrationStub.php'
],
'environments' => [
'default_migration_table' => 'migrations',
'default' => [
'adapter' => $config['driver'],
'host' => $config['host'],
'port' => $config['port'],
'name' => $config['database'],
'user' => $config['username'],
'pass' => $config['password']
]
]
];
?>