Skip to content

Commit 9d6f32d

Browse files
provokateurinbackportbot[bot]
authored andcommitted
fix(DB): Enforce foreign key constraints in SQLite
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent 1d22e4b commit 9d6f32d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/private/DB/SQLiteSessionInit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function postConnect(ConnectionEventArgs $args) {
4141
$sensitive = $this->caseSensitiveLike ? 'true' : 'false';
4242
$args->getConnection()->executeUpdate('PRAGMA case_sensitive_like = ' . $sensitive);
4343
$args->getConnection()->executeUpdate('PRAGMA journal_mode = ' . $this->journalMode);
44+
$args->getConnection()->executeUpdate('PRAGMA foreign_keys = true');
4445
/** @var \Doctrine\DBAL\Driver\PDO\Connection $connection */
4546
$connection = $args->getConnection()->getWrappedConnection();
4647
$pdo = $connection->getWrappedConnection();

0 commit comments

Comments
 (0)