|
- <?php
-
- namespace Config;
-
- use CodeIgniter\Database\Config;
-
-
- class Database extends Config
- {
-
-
- public $filesPath = APPPATH . 'Database' . DIRECTORY_SEPARATOR;
-
-
-
- public $defaultGroup = 'default';
-
-
-
- public $default = [
- 'DSN' => '',
- 'hostname' => 'localhost',
- 'username' => 'root',
- 'password' => '',
- 'database' => 'epic',
- 'DBDriver' => 'MySQLi',
- 'DBPrefix' => '',
- 'pConnect' => false,
- 'DBDebug' => (ENVIRONMENT !== 'production'),
- 'charset' => 'utf8',
- 'DBCollat' => 'utf8_general_ci',
- 'swapPre' => '',
- 'encrypt' => false,
- 'compress' => false,
- 'strictOn' => false,
- 'failover' => [],
- 'port' => 3306,
- ];
-
-
-
- public $tests = [
- 'DSN' => '',
- 'hostname' => '127.0.0.1',
- 'username' => '',
- 'password' => '',
- 'database' => ':memory:',
- 'DBDriver' => 'SQLite3',
- 'DBPrefix' => 'db_',
- 'pConnect' => false,
- 'DBDebug' => (ENVIRONMENT !== 'production'),
- 'charset' => 'utf8',
- 'DBCollat' => 'utf8_general_ci',
- 'swapPre' => '',
- 'encrypt' => false,
- 'compress' => false,
- 'strictOn' => false,
- 'failover' => [],
- 'port' => 3306,
- 'foreignKeys' => true,
- ];
-
- public function __construct()
- {
- parent::__construct();
-
-
-
-
- if (ENVIRONMENT === 'testing') {
- $this->defaultGroup = 'tests';
- }
- }
- }
|