-
Notifications
You must be signed in to change notification settings - Fork 2
/
phinx.php
39 lines (33 loc) · 935 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
<?php
/**
* @author aelix framework <info@aelix framework.org>
* @copyright Copyright (c) 2015 aelix framework
* @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License, version 3
*/
/*
* init aelix
*/
define('DS', DIRECTORY_SEPARATOR);
define('DIR_START', dirname(__FILE__) . DS); // from where we started the execution
// only init aelix (until database)
// we need the DB for phinx
define('AELIX_ONLY_INIT', true);
require 'src' . DS . 'bootstrap.php';
/*
* aelix done, generate phinx config
*/
use aelix\framework\Aelix;
// return phinx config array
return [
'paths' => [
'migrations' => DIR_ROOT . 'migrations'
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_database' => 'aelix',
'aelix' => [
'name' => Aelix::db()->getDatabaseName(),
'connection' => Aelix::db()->getPDO()
],
]
];