Enable foreign keys support in SQLite
ClosedPublic

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

Details

Summary

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.

Test Plan

All tests pass. Saving new database work. Saving existing database works.

Diff Detail

Repository
R261 KMyMoney
Lint
Lint Skipped
Unit
Unit Tests Skipped
wojnilowicz requested review of this revision.Jun 3 2018, 8:39 AM
wojnilowicz created this revision.
christiand accepted this revision as: christiand.Jun 10 2018, 10:24 AM
This revision is now accepted and ready to land.Jun 10 2018, 10:24 AM
This revision was automatically updated to reflect the committed changes.