Bug 24818: DBRev 19.12.00.046
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 19 Mar 2020 09:18:45 +0000 (09:18 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 19 Mar 2020 09:23:14 +0000 (09:23 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha.pm
Koha/Schema/Result/Accountline.pm
installer/data/mysql/atomicupdate/bug_24818.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 8d43594..5536c19 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.045";
+$VERSION = "19.12.00.046";
 
 sub version {
     return $VERSION;
index 1d455e6..12bb08c 100644 (file)
@@ -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 (file)
index 773f65d..0000000
+++ /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";
-}
index 60e4d01..90b9cf9 100755 (executable)
@@ -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/';