[Koha-bugs] [Bug 11617] Add itemnumber constraint to aqorders_items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jan 27 22:03:37 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11617

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

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

--- Comment #2 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 24783
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24783&action=edit
[SIGNED OFF] Bug 11617: Add itemnumber constraint to aqorders_items

This patch adds a foreign key constraint to aqorders_items on itemnumber.
It is a follow-up on report 10869 with changes to DelOrder.
This removes the need to delete these records in DelOrder.

REVISED TEST PLAN
---------
0) Backup DB, because you may want it back after.
1) go into mysql client, use the koha database and check:
   SHOW CREATE TABLE aqorders_items;
   -- should only be one constraint.
2) apply the patch
3) ./installer/mysql/data/updatedatabase.pl
4) go into mysql client, use the koha database and check:
   SHOW CREATE TABLE aqorders_items;
   -- should be two constraints.
5) drop the koha database and recreate it.
6) go to the staff client and do the web install.
7) go into mysql client, use the koha database and check:
   SHOW CREATE TABLE aqorders_items;
   -- should be two constraints.
8) Restore DB

Note that the constraints are in different orders, but identical.
The added constraint is:
  CONSTRAINT `aqorders_items_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES
`items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE

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