-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphinx.php
28 lines (28 loc) · 839 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
<?php
require 'public/index.php';
$migrations = [];
$seeds = [];
foreach ($modules as $module) {
if ($module::MIGRATIONS) {
$migrations[] = $module::MIGRATIONS;
}
if ($module::SEEDS) {
$seeds[] = $module::SEEDS;
}
}
return [
'paths' => [
'migrations' => $migrations,
'seeds' => $seeds
],
'environments' => [
'default_database' => 'development',
'development' => [
'adapter' => 'mysql',
'host' => $app->getContainer()->get('database.host'),
'user' => $app->getContainer()->get('database.username'),
'pass' => $app->getContainer()->get('database.password'),
'name' => $app->getContainer()->get('database.name')
]
]
];