feat(legacy): add db config defaults and allow custom port (#1559)
* feat(legacy): allow custom port for database connection - fix heredoc for php72 * update test config db section * update sample config db section * update api db config * use defaults for database config section * update documentation * more documentation for migration
This commit is contained in:
parent
71b3e6aa9d
commit
3245216869
12 changed files with 95 additions and 49 deletions
|
@ -28,7 +28,8 @@ class TestHelper
|
|||
|
||||
return new Zend_Config(
|
||||
[
|
||||
'host' => $config['dsn']['hostspec'],
|
||||
'host' => $config['dsn']['host'],
|
||||
'port' => $config['dsn']['port'],
|
||||
'dbname' => $config['dsn']['database'],
|
||||
'username' => $config['dsn']['username'],
|
||||
'password' => $config['dsn']['password'],
|
||||
|
@ -42,10 +43,11 @@ class TestHelper
|
|||
//is normally
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$dbhost = $CC_CONFIG['dsn']['host'];
|
||||
$dbport = $CC_CONFIG['dsn']['port'];
|
||||
$dbname = $CC_CONFIG['dsn']['database'];
|
||||
$dbuser = $CC_CONFIG['dsn']['username'];
|
||||
$dbpasswd = $CC_CONFIG['dsn']['password'];
|
||||
$dbname = $CC_CONFIG['dsn']['database'];
|
||||
$dbhost = $CC_CONFIG['dsn']['hostspec'];
|
||||
|
||||
$databaseAlreadyExists = AirtimeInstall::createDatabase();
|
||||
if ($databaseAlreadyExists) {
|
||||
|
@ -123,7 +125,7 @@ class TestHelper
|
|||
$con->commit();
|
||||
} else {
|
||||
//Create all the database tables
|
||||
AirtimeInstall::CreateDatabaseTables($dbuser, $dbpasswd, $dbname, $dbhost);
|
||||
AirtimeInstall::CreateDatabaseTables($dbuser, $dbpasswd, $dbname, $dbhost, $dbport);
|
||||
AirtimeInstall::UpdateDatabaseTables();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue