-
Notifications
You must be signed in to change notification settings - Fork 0
/
phinx.php
39 lines (36 loc) · 1.13 KB
/
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
use Symfony\Component\Dotenv\Dotenv;
if (file_exists(__DIR__ . '/.env')) {
$dotenv = new Dotenv();
$dotenv->load(__DIR__ . '/.env');
}
return
[
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/database/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/database/seeds'
],
'environments' => [
'default_migration_table' => 'migrations',
'default_database' => 'production',
'production' => [
'adapter' => 'mysql',
'host' => getenv("MYSQL_HOST"),
'name' => getenv("MYSQL_DB_NAME"),
'user' => getenv("MYSQL_USER"),
'pass' => getenv("MYSQL_PASSWORD"),
'port' => getenv("MYSQL_PORT"),
'charset' => 'utf8',
],
'testing' => [
'adapter' => 'mysql',
'host' => getenv("MYSQL_HOST_TEST"),
'name' => getenv("MYSQL_DB_NAME_TEST"),
'user' => getenv("MYSQL_USER_TEST"),
'pass' => getenv("MYSQL_PASSWORD_TEST"),
'port' => getenv("MYSQL_PORT_TEST"),
'charset' => 'utf8',
],
],
'version_order' => 'creation'
];