Enable foreign keys support in SQLite

Authored by wojnilowicz on Jun 3 2018, 8:37 AM.

Description

Enable foreign keys support in SQLite

Deleting from kmmOnlineJobs leaves kmmSepaOrders in tact because there
is no:

  1. ON DELETE relation between kmmSepaOrders and kmmOnlineJobs,
  2. foreign_keys is disabled on default on SQLite, which makes ON DELETE

possible.

Leaving kmmSepaOrders in tact prevents saving new records to it, because
there aren't overridden automatically and thus regarded as non unique,
which fails the requirement of INSERT.
We can easily recreate kmmSepaOrders (with ON DELETE constraint) without
taking its content into account, as it would be deleted anyways.

Differential Revision: https://phabricator.kde.org/D13295

Details

Committed
wojnilowiczJun 10 2018, 3:23 PM
Differential Revision
D13295: Enable foreign keys support in SQLite
Parents
R261:8658b8eb6b1b: Use QVERIFY_EXCEPTION_THROWN in MyMoneyMoney test
Branches
Unknown
Tags
Unknown