-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphinx.php
More file actions
31 lines (27 loc) · 1010 Bytes
/
Copy pathphinx.php
File metadata and controls
31 lines (27 loc) · 1010 Bytes
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
<?php
use App\Core\Config;
$config = Config::main();
$database_credentials = [
'adapter' => $config['DATABASE_ADAPTER'] ?? 'mysql',
'host' => $config['DATABASE_HOST'] ?? 'localhost',
'name' => $config['DATABASE_NAME'] ?? '',
'user' => $config['DATABASE_USERNAME'] ?? '',
'pass' => $config['DATABASE_PASSWORD'] ?? '',
'port' => $config['DATABASE_PORT'] ?? '3306',
'charset' => $config['DATABASE_CHARSET'] ?? 'utf8',
];
return
[
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/app/database/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/app/database/seeds'
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_environment' => $config['DATABASE_ENVIRONMENT'] ?? 'development',
'production' => $database_credentials,
'development' => $database_credentials,
'testing' => $database_credentials
],
'version_order' => 'creation'
];