My migrations are failing with Error: Cannot load database configuration
. I have my config setup like this... config.ini, development.ini & production.ini. Within config.ini I have a variable I can set to either "debelopment" or "production". Then in Bootstrap.php
I have the following;
protected function config()
{
$config = new \Phalcon\Config\Adapter\Ini(APP_PATH . '/app/common/config/config.ini');
$this->_di->set('config', $config);
if($this->config->app->env == 'development'){
$dev = new \Phalcon\Config\Adapter\Ini(APP_PATH . '/app/common/config/development.ini');
$config->merge($dev);
}else{
$prod = new \Phalcon\Config\Adapter\Ini(APP_PATH . '/app/common/config/production.ini');
$config->merge($prod);
}
$this->_config = $config;
}
This is probably why migrations are failing. My development database and production database have different credentials. What ligic does devtools migrations use to find the database configurations?