https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24412 --- Comment #27 from Josef Moravec <josef.moravec@gmail.com> --- Comment on attachment 101956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101956 Bug 24412: kohastructure and atomic update Review of attachment 101956: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=24412&attachment=101956) ----------------------------------------------------------------- ::: installer/data/mysql/atomicupdate/bug_24412_Attach_waiting_reserve_to_desk.perl @@ +1,4 @@
+$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + $dbh->do(q{
there should be check for column existance before adding it, something like: if ( !column_exists( 'reserves', 'desk_id' ) ) { $dbh->do(...); } @@ +5,5 @@
+ALTER TABLE reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode, + ADD KEY desk_id (`desk_id`), + ADD CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE CASCADE ON UPDATE CASCADE ; + }); + $dbh->do(q{
there should be check for column existance too -- You are receiving this mail because: You are watching all bug changes.