7ba5c812bda048b28ade940e0030b8000a02ae4b chmalee Mon Aug 10 11:58:51 2026 -0700 hubSpace: key rows on location so two hubs can hold the same file name, refs #37964 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> diff --git src/hg/lib/hubSpace.sql src/hg/lib/hubSpace.sql index ee643aa81de..fa462931d49 100644 --- src/hg/lib/hubSpace.sql +++ src/hg/lib/hubSpace.sql @@ -1,30 +1,30 @@ # hubSpace.sql was originally generated by the autoSql program, which also # generated hubSpace.c and hubSpace.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #file storage table for users to store uploaded tracks CREATE TABLE hubSpace ( userName varchar(255) not null, # userName of user uploading file fileName varchar(10000) not null, # name of uploaded files or directory. The actual path to this file is different fileSize bigint not null, # size of the uploaded file fileType varchar(255) not null, # track type of file, or subdir if not a track file creationTime timestamp default CURRENT_TIMESTAMP(), # first upload time lastModified timestamp, # last change time db varchar(255) not null, # genome assembly associated with this file location varchar(10000) not null, # file system path or URL to file md5sum varchar(255) not null, # md5sum of file parentDir varchar(1024) not null, # parent directory of file hubType varchar(255) not null default 'trackHub', # type of hub this file belongs to: trackHub or assemblyHub #Indices - PRIMARY KEY(userName, fileName(500), parentDir(245)), + PRIMARY KEY(userName, location(700)), INDEX(userName), - INDEX(fileName(25)), + INDEX(fileName(25), parentDir(245)), INDEX(fileType), INDEX(db), INDEX(location(25)), INDEX(creationTime), INDEX(lastModified), INDEX(md5sum), INDEX(parentDir) );