Bug 8643: DBRev 19.12.00.020
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 11 Feb 2020 14:36:55 +0000 (14:36 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 11 Feb 2020 14:37:34 +0000 (14:37 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha.pm
Koha/Schema/Result/MarcSubfieldStructure.pm
Koha/Schema/Result/MarcTagStructure.pm
installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 92944fa..702ee53 100644 (file)
--- a/Koha.pm
+++ b/Koha.pm
@@ -29,7 +29,7 @@ use vars qw{ $VERSION };
 # - #4 : the developer version. The 4th number is the database subversion.
 #        used by developers when the database changes. updatedatabase take care of the changes itself
 #        and is automatically called by Auth.pm when needed.
-$VERSION = "19.12.00.019";
+$VERSION = "19.12.00.020";
 
 sub version {
     return $VERSION;
index 94eba86..00f6dce 100644 (file)
@@ -63,6 +63,12 @@ __PACKAGE__->table("marc_subfield_structure");
   default_value: 0
   is_nullable: 0
 
+=head2 important
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
 =head2 kohafield
 
   data_type: 'varchar'
@@ -149,6 +155,8 @@ __PACKAGE__->add_columns(
   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
   "mandatory",
   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+  "important",
+  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
   "kohafield",
   { data_type => "varchar", is_nullable => 1, size => 40 },
   "tab",
@@ -214,8 +222,8 @@ __PACKAGE__->belongs_to(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-08-15 08:12:17
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pq6quXdds+U1JejYlrkcOw
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-11 14:36:42
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lCe1ZenRM/9rXnRHXhDuSw
 
 
 # You can replace this text with custom content, and it will be preserved on regeneration
index 4f16468..7a88031 100644 (file)
@@ -56,6 +56,12 @@ __PACKAGE__->table("marc_tag_structure");
   default_value: 0
   is_nullable: 0
 
+=head2 important
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
 =head2 authorised_value
 
   data_type: 'varchar'
@@ -96,6 +102,8 @@ __PACKAGE__->add_columns(
   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
   "mandatory",
   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+  "important",
+  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
   "authorised_value",
   { data_type => "varchar", is_nullable => 1, size => 10 },
   "ind1_defaultvalue",
@@ -121,8 +129,8 @@ __PACKAGE__->add_columns(
 __PACKAGE__->set_primary_key("frameworkcode", "tagfield");
 
 
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-04-09 09:07:51
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6EvGakEpGreV0hom7P6Efg
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-11 14:36:42
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JdpVv7CUrY61kqmMYDE4AA
 
 
 # You can replace this text with custom content, and it will be preserved on regeneration
diff --git a/installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.perl b/installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.perl
deleted file mode 100644 (file)
index 8965642..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-$DBversion = "XXX";
-if ( CheckVersion($DBversion) ) {
-    if ( !column_exists( 'marc_subfield_structure', 'important') ){
-        $dbh->do("ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER mandatory");
-    }
-    if ( !column_exists( 'marc_tag_structure', 'important') ){
-        $dbh->do("ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER mandatory");
-    }
-    SetVersion($DBversion);
-    print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\n";
-}
index 1378afc..84b3032 100755 (executable)
@@ -20746,6 +20746,18 @@ if( CheckVersion( $DBversion ) ) {
     print "Upgrade to $DBversion done (Bug 23673 - modify time_queued and add updated_on to message_queue)\n";
 }
 
+$DBversion = '19.12.00.020';
+if ( CheckVersion($DBversion) ) {
+    if ( !column_exists( 'marc_subfield_structure', 'important') ){
+        $dbh->do("ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER mandatory");
+    }
+    if ( !column_exists( 'marc_tag_structure', 'important') ){
+        $dbh->do("ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER mandatory");
+    }
+    SetVersion($DBversion);
+    print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\n";
+}
+
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.
 my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';