Skip to content

Commit b67760a

Browse files
Merge pull request #60793 from nextcloud/backport/60733/stable34
[stable34] fix(DB): Enforce foreign key constraints in SQLite
2 parents 37117ac + 5114b68 commit b67760a

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)