From: Martin Renvoize Date: Thu, 19 Mar 2020 09:18:45 +0000 (+0000) Subject: Bug 24818: DBRev 19.12.00.046 X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=12bac04164beeba2230089a6207c4436c704df12 Bug 24818: DBRev 19.12.00.046 Signed-off-by: Martin Renvoize --- diff --git a/Koha.pm b/Koha.pm index 8d43594..5536c19 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.045"; +$VERSION = "19.12.00.046"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm index 1d455e6..12bb08c 100644 --- a/Koha/Schema/Result/Accountline.pm +++ b/Koha/Schema/Result/Accountline.pm @@ -48,7 +48,7 @@ __PACKAGE__->table("accountlines"); =head2 date - data_type: 'date' + data_type: 'timestamp' datetime_undef_if_invalid: 1 is_nullable: 1 @@ -144,7 +144,11 @@ __PACKAGE__->add_columns( "itemnumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "date", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + { + data_type => "timestamp", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "amount", { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "description", @@ -363,8 +367,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-24 16:33:42 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q4Ahb8xIxAsjT/aF9yjrdQ +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-19 09:20:20 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BuE4CYsSH4BwXZoQKE2MWw sub koha_objects_class { 'Koha::Account::Lines'; diff --git a/installer/data/mysql/atomicupdate/bug_24818.perl b/installer/data/mysql/atomicupdate/bug_24818.perl deleted file mode 100644 index 773f65d..0000000 --- a/installer/data/mysql/atomicupdate/bug_24818.perl +++ /dev/null @@ -1,8 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - $dbh->do( "ALTER TABLE accountlines MODIFY COLUMN date TIMESTAMP NULL" ); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 24818: Update 'accountlines.date' from DATE to TIMESTAMP)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 60e4d01..90b9cf9 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21182,6 +21182,15 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 4461 - Add CollapseFieldsPatronAddForm system preference)\n"; } +$DBversion = '19.12.00.046'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do( "ALTER TABLE accountlines MODIFY COLUMN date TIMESTAMP NULL" ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24818: Update 'accountlines.date' from DATE to TIMESTAMP)\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/';