[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 Mar 4 15:09:04 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 #36122|0                           |1
        is obsolete|                            |

--- Comment #10 from Charles Farmer <charles.farmer at inlibro.com> ---
Created attachment 36494
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36494&action=edit
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/updatedatabase.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/updatedatabase.pl
    - It will create new tables and migrate the data
3) Run Overdues.t. Tests should be successful

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


More information about the Koha-bugs mailing list