# HG changeset patch # User Matti Hamalainen # Date 1416861802 -7200 # Node ID fc555d954b9907efd54a8729164219ac418fef4f # Parent f27dccdde8ef4e9b950fff601994709abf1667c5 Add preview_id to entries and the new files table for stored files. diff -r f27dccdde8ef -r fc555d954b99 dbdefs.inc.php --- a/dbdefs.inc.php Mon Nov 24 22:42:17 2014 +0200 +++ b/dbdefs.inc.php Mon Nov 24 22:43:22 2014 +0200 @@ -285,10 +285,22 @@ array("flags" , "INT", "DEFAULT 0"), array("evalue" , "INT", "DEFAULT 0"), array("file_id" , "INT", "DEFAULT 0"), // currently default file from "files" table + array("preview_id" , "INT", "DEFAULT 0"), // currently default preview from "files" table array("preview_type" , "INT", "DEFAULT 0"), // see EPREV_*, overrides compo's general type if != 0 array("utime" , "INT", "DEFAULT 0"), array("owner_id" , "INT", "DEFAULT 0"), // 0 = admin, otherwise votekey id ), + + "files" => array( + array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), + array("orig_filename", "VARCHAR(".SET_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"), // original uploaded filename + array("filename" , "VARCHAR(".SET_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"), // stored filename + array("filetype" , "VARCHAR(32)", "DEFAULT NULL"), // type of the file, if any, as key from $fileTypeData + array("filesize" , "INT", "DEFAULT 0"), // uploaded size + array("entry_id" , "INT", "DEFAULT 0"), // belongs to this entry (0 = none) + array("uploader_id" , "INT", "DEFAULT 0"), // 0 = admin, otherwise votekey id + array("deleted" , "INT", "DEFAULT 0"), // 0 = ok, 1 = to be deleted (don't show in filelists) + array("utime" , "INT", "DEFAULT 0"), ), "attendees" => array(