From a8bf1e5b495eea1f2eaf1ff68e77d9609d548ac5 Mon Sep 17 00:00:00 2001 From: Xiangyue Cai Date: Wed, 28 Jul 2021 16:04:07 +0800 Subject: [PATCH] fix sql (#42) --- manual/maintain/clean_database.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/maintain/clean_database.md b/manual/maintain/clean_database.md index 6677742c..b18c513e 100644 --- a/manual/maintain/clean_database.md +++ b/manual/maintain/clean_database.md @@ -107,7 +107,7 @@ There are two tables in Seafile db that are related to library sync tokens. When you have many sync clients connected to the server, these two tables can have large number of rows. Many of them are no longer actively used. You may clean the tokens that are not used in a recent period, by the following SQL query: ``` -delete from repousertoken t, repotokenpeerinfo i where t.token=i.token and sync_time < xxxx; +delete t,i from RepoUserToken t, RepoTokenPeerInfo i where t.token=i.token and sync_time < xxxx; ``` xxxx is the UNIX timestamp for the time before which tokens will be deleted. @@ -115,5 +115,5 @@ xxxx is the UNIX timestamp for the time before which tokens will be deleted. To be safe, you can first check how many tokens will be removed: ``` -select * from repousertoken t, repotokenpeerinfo i where t.token=i.token and sync_time < xxxx; +select * from RepoUserToken t, RepoTokenPeerInfo i where t.token=i.token and sync_time < xxxx; ```