]> git.koha-community.org Git - koha.git/commit
Bug 18058: Allow borrower_message_preferences to be truncated
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 14 Feb 2017 14:39:48 +0000 (14:39 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 31 Mar 2017 10:07:03 +0000 (10:07 +0000)
commitdd88c8f710e4915dac6437355c356f0632b776fb
tree34cdedb273867110eecac83782b988ae49a1bbd5
parentead7d86842d76e4619ebf7a4d9fa28998bad3442
Bug 18058: Allow borrower_message_preferences to be truncated

borrower_message_preferences cannot be truncated because of the foreign.
DBMS fails with
  "Cannot truncate a table referenced in a foreign key constraint"

To avoid that we should remove the FK check and truncate the other table
as well.

I am wondering if we really need a truncate here
  DELETE FROM borrower_message_preferences;
should do the job, but leave it as it because of the param name.

Test plan
  perl misc/maintenance/borrowers-force-messaging-defaults --doit --truncate
Should no longer raise the error message

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/maintenance/borrowers-force-messaging-defaults