From b1ac16b8e9a7f6d7b45c06133888fddb1d8338ba Mon Sep 17 00:00:00 2001
From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Date: Fri, 18 Dec 2015 11:40:02 -0300
Subject: [PATCH] Bug 8643: (follow-up) Atomic update

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
---
 .../mysql/atomicupdate/bug-8643-add_important_constraint.sql   | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.sql

diff --git a/installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.sql b/installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.sql
new file mode 100644
index 0000000000..0ffb746db5
--- /dev/null
+++ b/installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.sql
@@ -0,0 +1,10 @@
+ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER mandatory;
+ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER frameworkcode;
+
+-- $DBversion = "3.23.00.XXX";
+-- if ( CheckVersion($DBversion) ) {
+--     $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 frameworkcode");
+--     print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\n";
+--     SetVersion($DBversion);
+-- }
-- 
2.14.1