This commit is contained in:
2022-06-13 21:36:52 -04:00
parent 3580738273
commit 42a97bb074
100 changed files with 2574 additions and 313 deletions

View File

@ -5,7 +5,7 @@ foreach ($database->databases as $name => $settings) {
switch (strtolower($settings->engine)) {
case 'mysql':
$dsn = "mysql:host={$settings->host->name};dbname={$settings->name}" . (isset($settings->host->port) ? ';port=' . $settings->host->port : '');
ORM::configure([
Orm::configure([
'connection_string' => $dsn,
'username' => $settings->user->name,
'password' => $settings->user->password
@ -13,12 +13,12 @@ foreach ($database->databases as $name => $settings) {
break;
}
if (isset($settings->logging) and $settings->logging) {
ORM::configure('logging', true, $name);
Orm::configure('logging', true, $name);
}
if (isset($settings->caching) and $settings->caching) {
ORM::configure('caching', true, $name);
Orm::configure('caching', true, $name);
}
}
if (isset($database->short_names) and $database->short_names) {
Model::$short_table_names = true;
Orm::$short_table_names = true;
}