-
Notifications
You must be signed in to change notification settings - Fork 47
/
phinx.yml
executable file
·63 lines (56 loc) · 1.73 KB
/
phinx.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
define( 'DS' , DIRECTORY_SEPARATOR );
define( 'AROOT' , dirname( __FILE__ ) . DS );
define( 'FROOT' , dirname( __FILE__ ) . DS . '_lp' . DS );
require AROOT . 'vendor' . DS . 'autoload.php';
require_once FROOT . 'lib' . DS . 'functions.php'; // 公用函数
require_once FROOT . 'config' . DS . 'core.php'; // 核心配置
require_once AROOT . 'config' . DS . 'database.php'; // 数据库配置
require_once AROOT . 'config' . DS . 'app.php'; // 应用配置
date_default_timezone_set('Asia/Chongqing');
$dev = c('database_dev');
$pro = c('database');
$config = array
(
'paths' => array
(
'migrations' => 'migrations'
),
'environments' => array
(
'default_migration_table' => 'phinxlog',
'default_database' => 'development',
'production' => array
(
'adapter' => $pro['adapter'],
'host' => $pro['host'],
'name' => $pro['name'],
'user' => $pro['user'],
'pass' => $pro['pass'],
'port' => $pro['port'],
'charset' => $pro['charset']
),
'development' => array
(
'adapter' => $dev['adapter'],
'host' => $dev['host'],
'name' => $dev['name'],
'user' => $dev['user'],
'pass' => $dev['pass'],
'port' => $dev['port'],
'charset' => $dev['charset']
),
'testing' => array
(
'adapter' => $dev['adapter'],
'host' => $dev['host'],
'name' => $dev['name'],
'user' => $dev['user'],
'pass' => $dev['pass'],
'port' => $dev['port'],
'charset' => $dev['charset']
)
)
);
//print_r( $config );
return $config;