Skip to content

Commit 451ebb0

Browse files
authored
Merge pull request #6054 from kenjis/enable-sqlite3-foreignKeys
config: enable SQLite3 foreignKeys for testing
2 parents 167b26c + d363f1a commit 451ebb0

File tree

2 files changed

+36
-34
lines changed

2 files changed

+36
-34
lines changed

app/Config/Database.php

+18-17
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,24 @@ class Database extends Config
5757
* @var array
5858
*/
5959
public $tests = [
60-
'DSN' => '',
61-
'hostname' => '127.0.0.1',
62-
'username' => '',
63-
'password' => '',
64-
'database' => ':memory:',
65-
'DBDriver' => 'SQLite3',
66-
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
67-
'pConnect' => false,
68-
'DBDebug' => (ENVIRONMENT !== 'production'),
69-
'charset' => 'utf8',
70-
'DBCollat' => 'utf8_general_ci',
71-
'swapPre' => '',
72-
'encrypt' => false,
73-
'compress' => false,
74-
'strictOn' => false,
75-
'failover' => [],
76-
'port' => 3306,
60+
'DSN' => '',
61+
'hostname' => '127.0.0.1',
62+
'username' => '',
63+
'password' => '',
64+
'database' => ':memory:',
65+
'DBDriver' => 'SQLite3',
66+
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
67+
'pConnect' => false,
68+
'DBDebug' => (ENVIRONMENT !== 'production'),
69+
'charset' => 'utf8',
70+
'DBCollat' => 'utf8_general_ci',
71+
'swapPre' => '',
72+
'encrypt' => false,
73+
'compress' => false,
74+
'strictOn' => false,
75+
'failover' => [],
76+
'port' => 3306,
77+
'foreignKeys' => true,
7778
];
7879

7980
public function __construct()

tests/_support/Config/Registrar.php

+18-17
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,24 @@ class Registrar
6363
'port' => 5432,
6464
],
6565
'SQLite3' => [
66-
'DSN' => '',
67-
'hostname' => 'localhost',
68-
'username' => '',
69-
'password' => '',
70-
'database' => 'database.db',
71-
'DBDriver' => 'SQLite3',
72-
'DBPrefix' => 'db_',
73-
'pConnect' => false,
74-
'DBDebug' => (ENVIRONMENT !== 'production'),
75-
'charset' => 'utf8',
76-
'DBCollat' => 'utf8_general_ci',
77-
'swapPre' => '',
78-
'encrypt' => false,
79-
'compress' => false,
80-
'strictOn' => false,
81-
'failover' => [],
82-
'port' => 3306,
66+
'DSN' => '',
67+
'hostname' => 'localhost',
68+
'username' => '',
69+
'password' => '',
70+
'database' => 'database.db',
71+
'DBDriver' => 'SQLite3',
72+
'DBPrefix' => 'db_',
73+
'pConnect' => false,
74+
'DBDebug' => (ENVIRONMENT !== 'production'),
75+
'charset' => 'utf8',
76+
'DBCollat' => 'utf8_general_ci',
77+
'swapPre' => '',
78+
'encrypt' => false,
79+
'compress' => false,
80+
'strictOn' => false,
81+
'failover' => [],
82+
'port' => 3306,
83+
'foreignKeys' => true,
8384
],
8485
'SQLSRV' => [
8586
'DSN' => '',

0 commit comments

Comments
 (0)