1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-01 07:26:37 +00:00

improve sql (#492)

* improve sql

* improve sql
This commit is contained in:
Xiangyue Cai
2021-09-24 17:36:45 +08:00
committed by GitHub
parent c31dcc79ce
commit 53e8bbe5d4
2 changed files with 18 additions and 65 deletions

View File

@@ -220,7 +220,8 @@ CREATE TABLE IF NOT EXISTS RepoTokenPeerInfo (
peer_name VARCHAR(255),
sync_time BIGINT,
client_ver VARCHAR(20),
UNIQUE INDEX(token)
UNIQUE INDEX(token),
INDEX(peer_id)
) ENGINE=INNODB;
CREATE TABLE IF NOT EXISTS RepoTrash (
@@ -243,6 +244,7 @@ CREATE TABLE IF NOT EXISTS RepoUserToken (
email VARCHAR(255),
token CHAR(41),
UNIQUE INDEX(repo_id, token),
UNIQUE INDEX(token),
INDEX (email)
) ENGINE=INNODB;