diff --git a/Koha.pm b/Koha.pm index 92944fa088..702ee539f7 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.12.00.019"; +$VERSION = "19.12.00.020"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/MarcSubfieldStructure.pm b/Koha/Schema/Result/MarcSubfieldStructure.pm index 94eba864af..00f6dce07c 100644 --- a/Koha/Schema/Result/MarcSubfieldStructure.pm +++ b/Koha/Schema/Result/MarcSubfieldStructure.pm @@ -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 diff --git a/Koha/Schema/Result/MarcTagStructure.pm b/Koha/Schema/Result/MarcTagStructure.pm index 4f16468f68..7a88031015 100644 --- a/Koha/Schema/Result/MarcTagStructure.pm +++ b/Koha/Schema/Result/MarcTagStructure.pm @@ -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 index 8965642bf9..0000000000 --- a/installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.perl +++ /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"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 1378afc08f..84b30326c5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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/';