[Koha-bugs] [Bug 18058] 'borrowers-force-messaging-defaults --doit --truncate ' gives DBI error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 20 19:45:23 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18058

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #60202|0                           |1
        is obsolete|                            |

--- Comment #2 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 60479
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60479&action=edit
[SIGNED-OFF] 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 at hotmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list