Skip to content

Commit 5114b68

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

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
@@ -25,6 +25,7 @@ public function postConnect(ConnectionEventArgs $args): void {
2525
$sensitive = $this->caseSensitiveLike ? 'true' : 'false';
2626
$args->getConnection()->executeUpdate('PRAGMA case_sensitive_like = ' . $sensitive);
2727
$args->getConnection()->executeUpdate('PRAGMA journal_mode = ' . $this->journalMode);
28+
$args->getConnection()->executeUpdate('PRAGMA foreign_keys = true');
2829
/** @var \Doctrine\DBAL\Driver\PDO\Connection $connection */
2930
$connection = $args->getConnection()->getWrappedConnection();
3031
$pdo = $connection->getWrappedConnection();

0 commit comments

Comments
 (0)