Archived
1
0
Fork 0
This repository has been archived on 2026-04-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
httpcb/phinx.php

31 lines
628 B
PHP

<?php
require_once 'vendor/autoload.php';
use Phalcon\Config\Adapter\Yaml as Config;
$config = new Config('app/config/conf.local.yml');
$phinx = [
'paths' => [
'migrations' => 'app/migrations'
],
'environments' => [
'default_database' => 'main',
]
];
$db = $config->get('database');
if ($db) {
$phinx['environments']['main'] = [
'adapter' => strtolower($db->adapter),
'host' => $db->host,
'user' => $db->username,
'pass' => $db->password,
'name' => $db->dbname,
'charset' => $db->charset,
];
}
return $phinx;