From 8fa214bfa5cc0d46a3e34f4c09bb7635132b0b04 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1s=20Cohen=20Arazi?= Date: Fri, 7 Aug 2015 16:04:46 -0300 Subject: [PATCH] Bug 6874: DBRev 3.21.00.017 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- .../data/mysql/atomicupdate/06874_lastrevision.sql | 11 ----------- installer/data/mysql/updatedatabase.pl | 14 ++++++++++---- 3 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/06874_lastrevision.sql diff --git a/Koha.pm b/Koha.pm index df2140e57e..413074d11c 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 = "3.21.00.016"; +$VERSION = "3.21.00.017"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/06874_lastrevision.sql b/installer/data/mysql/atomicupdate/06874_lastrevision.sql deleted file mode 100644 index 81b37fe237..0000000000 --- a/installer/data/mysql/atomicupdate/06874_lastrevision.sql +++ /dev/null @@ -1,11 +0,0 @@ --- table adjustments for uploaded_files -ALTER TABLE uploaded_files - CHANGE COLUMN id hashvalue char(40) NOT NULL, - DROP PRIMARY KEY; -ALTER TABLE uploaded_files - ADD COLUMN id int NOT NULL AUTO_INCREMENT FIRST, - ADD CONSTRAINT PRIMARY KEY (id), - ADD COLUMN filesize int, - ADD COLUMN dtcreated timestamp, - ADD COLUMN categorycode tinytext, - ADD COLUMN owner int; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a167066ae1..e1d547a86d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10726,14 +10726,20 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } -$DBversion = "XXX"; +$DBversion = "3.21.00.017"; if ( CheckVersion($DBversion) ) { $dbh->do(" CREATE TABLE uploaded_files ( - id CHAR(40) NOT NULL PRIMARY KEY, + id int(11) NOT NULL AUTO_INCREMENT, + hashvalue CHAR(40) NOT NULL, filename TEXT NOT NULL, - dir TEXT NOT NULL - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + dir TEXT NOT NULL, + filesize int(11), + dtcreated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + categorycode tinytext, + owner int(11), + PRIMARY KEY (id) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci "); print "Upgrade to $DBversion done (Bug 6874: New cataloging plugin upload.pl)\n"; -- 2.39.5