@martyone is it really needed? If it is then it means that foreign key support is broken in SQLite and the lines

        if (!query.exec("PRAGMA foreign_keys = ON")) {
            qFatal("No foreign keys support in SQLite");
        }

are useless in EventStorage::open().