Browse Source

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).
Matthias Niess 6 years ago
parent
commit
5f7decfff1
1 changed files with 1 additions and 0 deletions
  1. 1 0
      config/database.php

+ 1 - 0
config/database.php

@@ -37,6 +37,7 @@ return [
             'driver' => 'sqlite',
             'database' => env('DB_DATABASE', database_path('database.sqlite')),
             'prefix' => '',
+            'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
         ],
 
         'mysql' => [