From 5f7decfff1b0c38183c60815c4d2b07d10112ba3 Mon Sep 17 00:00:00 2001 From: Matthias Niess Date: Tue, 30 Oct 2018 14:24:12 +0100 Subject: [PATCH] introduce sqlite foreign_key_constraints config option This enables the sqlite `foreign_key_constraints` option that was introduced with laravel/framework#26298 for all new installs. The env variable DB_FOREIGN_KEYS was added to make it easier to handle this in testing (e.g. via phpunit.xml). --- config/database.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/database.php b/config/database.php index 361ae34a..a4d20ddd 100644 --- a/config/database.php +++ b/config/database.php @@ -37,6 +37,7 @@ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', + 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), ], 'mysql' => [