forked from dusnm/journal_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phinx.php
31 lines (27 loc) · 918 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
<?php
use Dotenv\Dotenv;
require_once __DIR__.'/vendor/autoload.php';
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv->load();
return [
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/src/db/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/src/db/seeds',
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_database' => 'development',
'development' => [
'adapter' => $_ENV['DB_DRIVER'] ?? 'mysql',
'host' => $_ENV['DB_HOST'] ?? 'localhost',
'name' => $_ENV['DB_NAME'] ?? 'payments',
'user' => $_ENV['DB_USERNAME'] ?? 'root',
'pass' => $_ENV['DB_PASSWORD'] ?? '',
'port' => $_ENV['DB_PORT'] ?? 3306,
'charset' => $_ENV['DB_CHARSET'] ?? 'utf8mb4',
],
'testing'=> [],
'production' => []
],
'version_order' => 'creation',
];