forked from WaterWolfDev/WaterWolf-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphinx.php
28 lines (24 loc) · 749 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
/*
* This file configures Phinx, the database migrations tool.
*/
require (__DIR__) . '/vendor/autoload.php';
$dbInfo = App\Environment::getDatabaseInfo();
$di = App\AppFactory::buildContainer();
$db = $di->get(Doctrine\DBAL\Connection::class);
return
[
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds',
],
'environments' => [
'default_migration_table' => 'migrations',
'default_environment' => 'db',
'db' => [
'name' => $dbInfo['dbname'],
'connection' => $db->getNativeConnection(),
],
],
'version_order' => 'creation',
];