diff --git a/scripts/sql/mysql/seafile.sql b/scripts/sql/mysql/seafile.sql index 59fab22c..4a630dcc 100644 --- a/scripts/sql/mysql/seafile.sql +++ b/scripts/sql/mysql/seafile.sql @@ -324,5 +324,6 @@ CREATE TABLE IF NOT EXISTS WebUploadTempFiles ( id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, repo_id CHAR(40) NOT NULL, file_path TEXT NOT NULL, - tmp_file_path TEXT NOT NULL + tmp_file_path TEXT NOT NULL, + INDEX(repo_id) ) ENGINE=INNODB; diff --git a/server/repo-mgr.c b/server/repo-mgr.c index dd2550a1..fb00f89f 100644 --- a/server/repo-mgr.c +++ b/server/repo-mgr.c @@ -1095,7 +1095,7 @@ create_tables_mysql (SeafRepoManager *mgr) sql = "CREATE TABLE IF NOT EXISTS WebUploadTempFiles ( " "id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, repo_id CHAR(40) NOT NULL, " - "file_path TEXT NOT NULL, tmp_file_path TEXT NOT NULL, UNIQUE INDEX(repo_id)) ENGINE=INNODB"; + "file_path TEXT NOT NULL, tmp_file_path TEXT NOT NULL, INDEX(repo_id)) ENGINE=INNODB"; if (seaf_db_query (db, sql) < 0) return -1;