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