Bug 24289: Add foreign keys on *_holidays.branchcode tables
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 26 Dec 2019 10:42:43 +0000 (11:42 +0100)
committerJoy Nelson <joy@bywatersolutions.com>
Fri, 7 Feb 2020 23:01:47 +0000 (23:01 +0000)
commit8d42c6be904cf1e23c179063500d236fc5789d8f
treed74f86164d1a2f866929a74b1ff865309d2f9e53
parent1887f8a715944b80227171441b427d5ccf6177d1
Bug 24289: Add foreign keys on *_holidays.branchcode tables

Those are missing foreign keys, it will also clean the holidays tables
and automatically remove the holidays when a library is removed.

Test plan:
0. Do not apply this patch
1. Create a new library
2. Create special and repeatable holiday for this library
3. Remove the library
=> Notice that the holidays still exist in DB
4. Apply this patch
5. Execute the update database entry
=> Notice that the holidays for this library have been removed from the DB
6. Repeat 1-3
=> Notice that the holidays have been removed along with the library

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
installer/data/mysql/atomicupdate/bug_24289.perl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql