From ebc29c6fda53e856a807459a6e6b15fc3298ee57 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 18 Mar 2020 22:03:37 +0000 Subject: [PATCH] Bug 21663: DBRev 19.05.003 Signed-off-by: Lucas Gass --- Koha.pm | 2 +- Koha/Schema/Result/Deleteditem.pm | 9 ++++----- Koha/Schema/Result/Item.pm | 9 ++++----- Koha/Schema/Result/Quote.pm | 8 ++++---- .../bug_21633_remove_finesMode_test.perl | 14 -------------- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 6 files changed, 28 insertions(+), 29 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_21633_remove_finesMode_test.perl diff --git a/Koha.pm b/Koha.pm index b9ad22241c..2f31eab9ee 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.05.08.002"; +$VERSION = "19.05.08.003"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm index 33f1935a4b..192017ff67 100644 --- a/Koha/Schema/Result/Deleteditem.pm +++ b/Koha/Schema/Result/Deleteditem.pm @@ -244,9 +244,8 @@ __PACKAGE__->table("deleteditems"); =head2 uri - data_type: 'varchar' + data_type: 'mediumtext' is_nullable: 1 - size: 255 =head2 itype @@ -379,7 +378,7 @@ __PACKAGE__->add_columns( "materials", { data_type => "mediumtext", is_nullable => 1 }, "uri", - { data_type => "varchar", is_nullable => 1, size => 255 }, + { data_type => "mediumtext", is_nullable => 1 }, "itype", { data_type => "varchar", is_nullable => 1, size => 10 }, "more_subfields_xml", @@ -407,8 +406,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("itemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-26 16:15:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L7G0HG5gvgyhfpKb7LcUFw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-18 22:07:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cIWMKg2PVVOrSp1uLtpJbg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 9d5743f5c2..71070c2b06 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -248,9 +248,8 @@ __PACKAGE__->table("items"); =head2 uri - data_type: 'varchar' + data_type: 'mediumtext' is_nullable: 1 - size: 255 =head2 itype @@ -393,7 +392,7 @@ __PACKAGE__->add_columns( "materials", { data_type => "mediumtext", is_nullable => 1 }, "uri", - { data_type => "varchar", is_nullable => 1, size => 255 }, + { data_type => "mediumtext", is_nullable => 1 }, "itype", { data_type => "varchar", is_nullable => 1, size => 10 }, "more_subfields_xml", @@ -717,8 +716,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-14 18:14:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wDXcErUYqg0aoQkzz3P5vg +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-18 22:07:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ni/Dx4JeBoVK8NwlM3lw5Q __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/Koha/Schema/Result/Quote.pm b/Koha/Schema/Result/Quote.pm index 94b06eeb2f..e161cd5aca 100644 --- a/Koha/Schema/Result/Quote.pm +++ b/Koha/Schema/Result/Quote.pm @@ -43,7 +43,7 @@ __PACKAGE__->table("quotes"); data_type: 'datetime' datetime_undef_if_invalid: 1 - is_nullable: 0 + is_nullable: 1 =cut @@ -58,7 +58,7 @@ __PACKAGE__->add_columns( { data_type => "datetime", datetime_undef_if_invalid => 1, - is_nullable => 0, + is_nullable => 1, }, ); @@ -75,8 +75,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8xSMrGuJH9rbm73qOvU8Xg +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-18 22:07:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Zg5y1dD3VBM2LvgntktD0w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/installer/data/mysql/atomicupdate/bug_21633_remove_finesMode_test.perl b/installer/data/mysql/atomicupdate/bug_21633_remove_finesMode_test.perl deleted file mode 100644 index 58b0282f56..0000000000 --- a/installer/data/mysql/atomicupdate/bug_21633_remove_finesMode_test.perl +++ /dev/null @@ -1,14 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $dbh->do(q{ - UPDATE systempreferences SET value = 'off' - WHERE variable = 'finesMode' AND (value <> 'production' OR value IS NULL) - }); - $dbh->do(q{ - UPDATE systempreferences SET options = 'off|production', - explanation = "Choose the fines mode, 'off' (do not accrue fines) or 'production' (accrue overdue fines). Requires accruefines cronjob or CalculateFinesOnReturn system preference." - WHERE variable = 'finesMode' - }); - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 21633 - Remove finesMode 'test')\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 819ccc06ac..b3b5ec0ad5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -18990,6 +18990,21 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 24640 - Allow quotes.timestamp to be NULL)\n"; } +$DBversion = '19.05.08.003'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + UPDATE systempreferences SET value = 'off' + WHERE variable = 'finesMode' AND (value <> 'production' OR value IS NULL) + }); + $dbh->do(q{ + UPDATE systempreferences SET options = 'off|production', + explanation = "Choose the fines mode, 'off' (do not accrue fines) or 'production' (accrue overdue fines). Requires accruefines cronjob or CalculateFinesOnReturn system preference." + WHERE variable = 'finesMode' + }); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 21633 - Remove finesMode 'test')\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5