Merge "Drop unused database field ss_admins"
[lhc/web/wiklou.git] / maintenance / archives / patch-uploadstash.sql
index 2d29c3b..2512076 100644 (file)
@@ -1,5 +1,5 @@
 --
--- Store information about newly uploaded files before they're
+-- Store information about newly uploaded files before they're 
 -- moved into the actual filestore
 --
 CREATE TABLE /*_*/uploadstash (
@@ -22,7 +22,9 @@ CREATE TABLE /*_*/uploadstash (
        us_source_type varchar(50),
        
        -- the date/time on which the file was added
-       us_timestamp varchar(14) not null,
+       us_timestamp varbinary(14) not null,
+       
+       us_status varchar(50) not null,
 
        -- file properties from File::getPropsFromPath.  these may prove unnecessary.
        --
@@ -30,7 +32,8 @@ CREATE TABLE /*_*/uploadstash (
        -- this hash comes from File::sha1Base36(), and is 31 characters
        us_sha1 varchar(31) NOT NULL,
        us_mime varchar(255),
-       us_media_type varchar(255),
+       -- Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table
+       us_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
        -- image-specific properties
        us_image_width int unsigned,
        us_image_height int unsigned,
@@ -43,4 +46,4 @@ CREATE INDEX /*i*/us_user ON /*_*/uploadstash (us_user);
 -- pick out files by key, enforce key uniqueness
 CREATE UNIQUE INDEX /*i*/us_key ON /*_*/uploadstash (us_key);
 -- the abandoned upload cleanup script needs this
-CREATE INDEX /*i*/us_timestamp ON /*_*/uploadstash (us_timestamp);
\ No newline at end of file
+CREATE INDEX /*i*/us_timestamp ON /*_*/uploadstash (us_timestamp);