winter/config/database.php

147 lines
4.7 KiB
PHP
Raw Normal View History

2014-05-14 23:24:20 +10:00
<?php
2015-03-11 20:30:41 +01:00
return [
2014-05-14 23:24:20 +10:00
2014-10-10 21:54:19 +02:00
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'fetch' => PDO::FETCH_CLASS,
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => 'mysql',
2014-10-10 21:54:19 +02:00
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Winter CMS is shown below to make development simple.
2014-10-10 21:54:19 +02:00
|
| All database work in Winter CMS is done through the PHP PDO facilities
2014-10-10 21:54:19 +02:00
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
2015-03-11 20:30:41 +01:00
'connections' => [
2014-10-10 21:54:19 +02:00
2015-03-11 20:30:41 +01:00
'sqlite' => [
'driver' => 'sqlite',
// 'url' => env('DATABASE_URL'),
'database' => base_path('storage/database.sqlite'),
'prefix' => '',
'foreign_key_constraints' => true,
2015-03-11 20:30:41 +01:00
],
2014-10-10 21:54:19 +02:00
2015-03-11 20:30:41 +01:00
'mysql' => [
'driver' => 'mysql',
// 'url' => env('DATABASE_URL'),
'engine' => 'InnoDB',
'host' => '127.0.0.1',
'port' => 3306,
'database' => 'database',
'username' => 'root',
'password' => '',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'varcharmax' => 191,
2015-03-11 20:30:41 +01:00
],
2014-10-10 21:54:19 +02:00
2015-03-11 20:30:41 +01:00
'pgsql' => [
'driver' => 'pgsql',
// 'url' => env('DATABASE_URL'),
'host' => '127.0.0.1',
'port' => 5432,
'database' => 'database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
2015-03-12 09:13:04 +11:00
],
2014-10-10 21:54:19 +02:00
2015-03-11 20:30:41 +01:00
'sqlsrv' => [
'driver' => 'sqlsrv',
// 'url' => env('DATABASE_URL'),
'host' => '127.0.0.1',
'port' => 1433,
'database' => 'database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
2015-03-11 20:30:41 +01:00
],
2014-10-10 21:54:19 +02:00
2015-03-11 20:30:41 +01:00
],
2014-10-10 21:54:19 +02:00
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk have not actually be run in the databases.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Winter CMS makes it easy to dig right in.
2014-10-10 21:54:19 +02:00
|
*/
2015-03-11 20:30:41 +01:00
'redis' => [
2014-10-10 21:54:19 +02:00
'client' => 'predis',
'options' => [
'cluster' => 'redis',
'prefix' => '',
],
2014-10-10 21:54:19 +02:00
2015-03-11 20:30:41 +01:00
'default' => [
// 'url' => env('REDIS_URL'),
'host' => '127.0.0.1',
'password' => null,
'port' => 6379,
2014-10-10 21:54:19 +02:00
'database' => 0,
2015-03-11 20:30:41 +01:00
],
2014-10-10 21:54:19 +02:00
2015-03-11 20:30:41 +01:00
],
2014-05-14 23:24:20 +10:00
2015-03-11 20:30:41 +01:00
];