-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathphinx.php
42 lines (39 loc) · 996 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
36
37
38
39
40
41
42
<?php
require __DIR__ . '/vendor/autoload.php';
if(file_exists(__DIR__ .'/.env')) {
$dotenv = new \Dotenv\Dotenv(__DIR__);
$dotenv->overload();
}
$db = include __DIR__ . '/config/db.php';
list(
'driver' => $adapter,
'host' => $host,
'database' => $name,
'username' => $user,
'password' => $pass,
'charset' => $charset,
'collation' => $collation
) = $db['default_connection'];
return [
'paths' => [
'migrations' => [
__DIR__ . '/db/migrations'
],
'seeds' => [
__DIR__ . '/db/seeds'
]
],
'environments' => [
'default_migration_table' => 'migrations',
'default_database' => 'default_connection',
'default_connection' => [
'adapter' => $adapter,
'host' => $host,
'name' => $name,
'user' => $user,
'pass' => $pass,
'charset' => $charset,
'collation' => $collation
]
]
];