https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8643 --- Comment #75 from Josef Moravec <josef.moravec@gmail.com> --- Comment on attachment 81032 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81032 Bug 8643: Add important constraint to marc subfields Review of attachment 81032: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=8643&attachment=81032) ----------------------------------------------------------------- ::: installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.sql @@ +6,5 @@
+-- $dbh->do("ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0 AFTER mandatory"); +-- $dbh->do("ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0 AFTER mandatory"); +-- print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\n"; +-- SetVersion($DBversion); +-- }
The database update should be idempotent, make it all in perl and use column_exists helper function, like this: if( !column_exists( 'marc_subfield_structure', 'important' ) ) { $dbh->do("ALTER TABLE ... ADD COLUMN ..."); } -- You are receiving this mail because: You are watching all bug changes.