Browse Source
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>20.11.x
Jonathan Druart
4 years ago
2 changed files with 24 additions and 2 deletions
@ -0,0 +1,20 @@ |
|||
$DBversion = 'XXX'; # will be replaced by the RM |
|||
if( CheckVersion( $DBversion ) ) { |
|||
|
|||
if( !column_exists( 'biblioimages', 'itemnumber' ) ) { |
|||
$dbh->do(q| |
|||
ALTER TABLE biblioimages |
|||
ADD COLUMN itemnumber INT(11) DEFAULT NULL |
|||
AFTER biblionumber; |
|||
|); |
|||
$dbh->do(q| |
|||
ALTER TABLE biblioimages |
|||
ADD FOREIGN KEY bibliocoverimage_fk2 (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE |
|||
|); |
|||
$dbh->do(q| |
|||
ALTER TABLE biblioimages MODIFY biblionumber INT(11) DEFAULT NULL |
|||
|) |
|||
} |
|||
|
|||
NewVersion( $DBversion, 'XXXXX', "Add the biblioimages.itemnumber column"); |
|||
} |
Loading…
Reference in new issue