From 347dc9589aa75edb1c64c21e5d057373dfd3ed84 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 15 Aug 2019 09:16:02 +0100 Subject: [PATCH] Bug 23309: DBRev 19.06.00.021 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- Koha/Schema/Result/MarcSubfieldStructure.pm | 9 +++++---- installer/data/mysql/atomicupdate/bug_23309.perl | 10 ---------- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 4 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_23309.perl diff --git a/Koha.pm b/Koha.pm index 2f0b60e4be..0d0b727a4b 100644 --- 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.06.00.020"; +$VERSION = "19.06.00.021"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/MarcSubfieldStructure.pm b/Koha/Schema/Result/MarcSubfieldStructure.pm index 1c28713b02..94eba864af 100644 --- a/Koha/Schema/Result/MarcSubfieldStructure.pm +++ b/Koha/Schema/Result/MarcSubfieldStructure.pm @@ -101,7 +101,8 @@ __PACKAGE__->table("marc_subfield_structure"); =head2 hidden data_type: 'tinyint' - is_nullable: 1 + default_value: 8 + is_nullable: 0 =head2 frameworkcode @@ -161,7 +162,7 @@ __PACKAGE__->add_columns( "isurl", { data_type => "tinyint", is_nullable => 1 }, "hidden", - { data_type => "tinyint", is_nullable => 1 }, + { data_type => "tinyint", default_value => 8, is_nullable => 0 }, "frameworkcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, "seealso", @@ -213,8 +214,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-02 18:57:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:18iBiNNiwTSYtKk28aoLJg +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-08-15 08:12:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pq6quXdds+U1JejYlrkcOw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/installer/data/mysql/atomicupdate/bug_23309.perl b/installer/data/mysql/atomicupdate/bug_23309.perl deleted file mode 100644 index 9db4d07fe4..0000000000 --- a/installer/data/mysql/atomicupdate/bug_23309.perl +++ /dev/null @@ -1,10 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - $dbh->do(q| - ALTER TABLE marc_subfield_structure CHANGE COLUMN hidden hidden TINYINT(1) DEFAULT 8 NOT NULL; - |); - # Always end with this (adjust the bug info) - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 23309 - Can't add new subfields to bibliographic frameworks in strict mode)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c879a0766c..a3e19262f5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -19250,6 +19250,17 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 23416 - Add PreserveSerialNotes syspref)\n"; } +$DBversion = '19.06.00.021'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do(q| + ALTER TABLE marc_subfield_structure CHANGE COLUMN hidden hidden TINYINT(1) DEFAULT 8 NOT NULL; + |); + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23309 - Can't add new subfields to bibliographic frameworks in strict mode)\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/'; -- 2.39.5