[Koha-bugs] [Bug 13624] Remove columns branchcode, categorytype from table overduerules_transport_types
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jan 28 18:13:08 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13624
Charles Farmer <charles.farmer at inlibro.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35561|0 |1
is obsolete| |
--- Comment #3 from Charles Farmer <charles.farmer at inlibro.com> ---
Created attachment 35587
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35587&action=edit
[PATCH] Bug #13624: Remove columns branchcode, categorytype from table
overduerules_transport_types
Sponsored by Halland County Library
This patch is a _requirement_ to Bug #12771, and will be necessary once we
start managing more than 3 levels of overdue notice
In installer/data/mysql/atomicupdate/bug_13624_overduerules_transport_types.pl
- A new column and primary key, 'overduerules_id', is added to the table
'overduerules'
- A new column referencing a foreign key, 'overduerules_id', is added to
the table 'overduerules_transport_types'
- The columns 'branchcode' and 'categorytype' are removed from the table
'overduerules_transport_types'
- Data is migrated from the old tables to the new ones
In installer/data/mysql/kohastructure.sql :
- Table 'overduerules'
- Added a primary key named 'overduerules_id'
- Table 'overduerules_transport_types'
- Added a foreign key named 'overduerules_id'
- Dropped columns 'branchcode', 'categorycode' since we now have them
referenced through 'overduerules_id'
In tools/overduerules.pl
- INSERT and DELETE queries on 'overduerules_transport_types' were changed
to reflect the new schema
In C4/Overdues.pm :
- The SQL query of the function 'GetOverdueMessageTransportTypes' is
changed to take into account the new design of 'overduerules_transport
In t/db_dependent/Overdues.t :
- The INSERT calls before the tests were changed to take into account the
new design of 'overduerules' and 'overduerules_transport_types'
TEST PLAN
---------
1) Apply the patch
2) Run the script
installer/data/mysql/atomicupdate/bug_13624_overduerules_transport_types.pl
- It will create new tables and migrate the data
3) Run Overdues.t. Tests should be successful
modified: C4/Overdues.pm
new file:
installer/data/mysql/atomicupdate/bug_13624_overduerules_transport_types.pl
modified: installer/data/mysql/kohastructure.sql
modified: t/db_dependent/Overdues.t
modified: tools/overduerules.pl
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list