Bug 6874: DBRev 3.21.00.017

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This commit is contained in:
Tomás Cohen Arazi 2015-08-07 16:04:46 -03:00 committed by Tomas Cohen Arazi
parent 03ae8f70c2
commit 8fa214bfa5
3 changed files with 11 additions and 16 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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";