fix(DB): Enforce foreign key constraints in SQLite

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2026-05-04 10:05:55 +02:00 committed by backportbot[bot]
parent b8f2dd4133
commit 5114b6848d

View file

@ -25,6 +25,7 @@ class SQLiteSessionInit implements EventSubscriber {
$sensitive = $this->caseSensitiveLike ? 'true' : 'false';
$args->getConnection()->executeUpdate('PRAGMA case_sensitive_like = ' . $sensitive);
$args->getConnection()->executeUpdate('PRAGMA journal_mode = ' . $this->journalMode);
$args->getConnection()->executeUpdate('PRAGMA foreign_keys = true');
/** @var \Doctrine\DBAL\Driver\PDO\Connection $connection */
$connection = $args->getConnection()->getWrappedConnection();
$pdo = $connection->getWrappedConnection();