43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
|
|
if (file_exists(__DIR__ . '/.env')) {
|
|
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
|
|
$dotenv->safeLoad();
|
|
}
|
|
|
|
return [
|
|
'paths' => [
|
|
'migrations' => __DIR__ . '/db/migrations',
|
|
'seeds' => __DIR__ . '/db/seeds',
|
|
],
|
|
|
|
'environments' => [
|
|
'default_migration_table' => 'phinxlog',
|
|
'default_environment' => 'development',
|
|
|
|
'development' => [
|
|
'adapter' => 'mysql',
|
|
'host' => $_ENV['DB_HOST'] ?? '127.0.0.1',
|
|
'name' => $_ENV['DB_DATABASE'] ?? 'trfgo',
|
|
'user' => $_ENV['DB_USERNAME'] ?? 'root',
|
|
'pass' => $_ENV['DB_PASSWORD'] ?? '',
|
|
'port' => $_ENV['DB_PORT'] ?? '3306',
|
|
'charset' => 'utf8mb4',
|
|
],
|
|
|
|
'production' => [
|
|
'adapter' => 'mysql',
|
|
'host' => $_ENV['DB_HOST'] ?? '127.0.0.1',
|
|
'name' => $_ENV['DB_DATABASE'] ?? 'trfgo',
|
|
'user' => $_ENV['DB_USERNAME'] ?? 'root',
|
|
'pass' => $_ENV['DB_PASSWORD'] ?? '',
|
|
'port' => $_ENV['DB_PORT'] ?? '3306',
|
|
'charset' => 'utf8mb4',
|
|
],
|
|
],
|
|
|
|
'version_order' => 'creation',
|
|
];
|