Skip to content

Commit 7669745

Browse files
authored
Merge pull request #1 from veeqtoh/main
Ensure that foreign key constraints are enforced
2 parents 6c3da1b + 35c685b commit 7669745

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ This will publish a migration that apply defaults like so:
4242
DB::statement('PRAGMA page_size = 32768;');
4343
DB::statement('PRAGMA cache_size = -20000;');
4444
DB::statement('PRAGMA auto_vacuum = incremental;');
45+
DB::statement('PRAGMA foreign_keys = ON;');
4546

4647
// etc...
4748
}
48-
};
4949
```
5050

5151
Next, you simply need to run the migration:

database/migrations/optimize_database_settings.php.stub

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ return new class extends Migration
1717
DB::statement('PRAGMA page_size = 32768;');
1818
DB::statement('PRAGMA cache_size = -20000;');
1919
DB::statement('PRAGMA auto_vacuum = incremental;');
20+
DB::statement('PRAGMA foreign_keys = ON;');
2021
}
2122
}
2223
};

0 commit comments

Comments
 (0)