--- /dev/null
+<?php
+
+return 1 == 1 ? [
+ 'class' => yii\db\Connection::class,
+ 'dsn' => strtr('pgsql:host={host};port={port};dbname={dbname}', [
+ '{host}' => getenv('POSTGRES_HOSTNAME') ?: '127.0.0.1',
+ '{port}' => getenv('POSTGRES_PORT') ?: 5432,
+ '{dbname}' => getenv('POSTGRES_SCHEMA') ?: 'erp24',
+ ]),
+ 'username' => getenv('POSTGRES_USER') ?: 'bazacvetov24',
+ 'password' => getenv('POSTGRES_PASSWORD') ?: 'JVJruro_Xdg456o3ir',
+ 'schemaMap' => [
+ 'pgsql' => [
+ 'class' => 'yii\db\pgsql\Schema',
+ 'defaultSchema' => 'erp24' //specify your schema here, public is the default schema
+ ]
+ ], // PostgreSQL
+// 'charset' => 'utf8',
+// 'enableSchemaCache' => true,
+// 'schemaCacheDuration' => 300,
+]: [
+ 'class' => yii\db\Connection::class,
+ 'dsn' => strtr('mysql:host={host};port={port};dbname={dbname}', [
+ '{host}' => getenv('DB_HOST') ?: '127.0.0.1',
+ '{port}' => getenv('DB_PORT') ?: 3306,
+ '{dbname}' => getenv('DB_SCHEMA') ?: 'erp24',
+ ]),
+ 'username' => getenv('DB_USER') ?: 'bazacvetov24',
+ 'password' => getenv('DB_PASSWORD') ?: 'JVJruro_Xdg456o3ir',
+ 'charset' => 'utf8',
+ 'enableSchemaCache' => true,
+ 'schemaCacheDuration' => 300,
+
+ // Schema cache options (for production environment)
+ //'enableSchemaCache' => true,
+ //'schemaCacheDuration' => 60,
+ //'schemaCache' => 'cache',
+];