d2800e10690b66bf2ab04804e124958459f0ff0d
chmalee
  Thu Nov 7 11:11:15 2024 -0800
Add a parentDir field to the hubSpace table and make an index on it

diff --git src/hg/inc/userdata.h src/hg/inc/userdata.h
index 6348917..d1a1d5b 100644
--- src/hg/inc/userdata.h
+++ src/hg/inc/userdata.h
@@ -45,31 +45,31 @@
 char *webDataDir(char *userName);
 /* Return a web accesible path to the userDataDir, this is different from the full path tusd uses */
 
 char *getDataDir(char *userName);
 /* Return the full path to the user specific data directory, can be configured via hg.conf
  * on hgwdev, this is /data/apache/userdata/userStore/hash/userName/
  * on the RR, this is /userdata/userStore/hash/userName/ */
 
 char *prefixUserFile(char *userName, char *fname);
 /* Allocate a new string that contains the full per-user path to fname, NULL otherwise */
 
 char *writeHubText(char *path, char *userName, char *encodedHubName, char *hubName, char *db);
 /* Create a hub.txt file, optionally creating the directory holding it. For convenience, return
  * the file name of the created hub, which can be freed. */
 
-char *createNewTempHubForUpload(char *requestId, char *userName, char *db, char *trackFileName, char *trackType, char *reqHubName);
+char *createNewTempHubForUpload(char *requestId, char *userName, char *db, char *trackFileName, char *trackType, char *reqHubName, char *parentDir);
 /* Creates a hub.txt for this upload with a random hub name. Returns the full path to the hub
  * for convenience. If the reqHubName argument is non-NULL, use that as the hub name instead of
  * a random string AND do not create a hub.txt, only for use from hubtools up command */
 
 void addHubSpaceRowForFile(struct hubSpace *row);
 /* We created a file for a user, now add an entry to the hubSpace table for it */
 
 void removeFileForUser(char *fname, char *userName);
 /* Remove a file for this user if it exists */
 
 void removeHubForUser(char *path, char *userName);
 /* Remove a hub directory for this user (and all files in the directory), if it exists */
 
 struct userHubs *listHubsForUser(char *userName);
 /* Lists the directories for a particular user */