2024-04-13 20:35:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use App\Controller\ConfigController;
|
|
|
|
|
|
|
|
require 'vendor/autoload.php';
|
|
|
|
|
2024-04-14 20:14:41 +02:00
|
|
|
$configController = new ConfigController(quiet: true);
|
2024-04-13 20:35:20 +02:00
|
|
|
|
|
|
|
$dbHost = $configController->getConfig(configKey: 'dbHost');
|
|
|
|
$dbPort = $configController->getConfig(configKey: 'dbPort');
|
|
|
|
$dbDatabase = $configController->getConfig(configKey: 'dbDatabase');
|
|
|
|
$dbUser = $configController->getConfig(configKey: 'dbUser');
|
|
|
|
$dbPassword = $configController->getConfig(configKey: 'dbPassword');
|
|
|
|
|
|
|
|
|
|
|
|
// unlike the example config, we don't maintain different environments here,
|
|
|
|
// that is set globally, currently by selecting the matching config.json.
|
|
|
|
// but that might change to envfiles in the future
|
|
|
|
|
|
|
|
return
|
|
|
|
[
|
|
|
|
'paths' => [
|
|
|
|
'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations',
|
|
|
|
'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds'
|
|
|
|
],
|
|
|
|
'environments' => [
|
|
|
|
'default_migration_table' => 'phinxlog',
|
|
|
|
'default_environment' => 'default',
|
|
|
|
'default' => [
|
|
|
|
'adapter' => 'mysql',
|
|
|
|
'host' => $dbHost,
|
|
|
|
'name' => $dbDatabase,
|
|
|
|
'user' => $dbUser,
|
|
|
|
'pass' => $dbPassword,
|
|
|
|
'port' => $dbPort,
|
|
|
|
'charset' => 'utf8',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'version_order' => 'creation'
|
|
|
|
];
|