fix(sqlite): add indexes and unique constraint

This commit is contained in:
hexxa 2022-09-16 09:58:31 +08:00 committed by Hexxa
parent df5c820c68
commit d97451653e
4 changed files with 37 additions and 16 deletions

View file

@ -137,8 +137,8 @@ func (st *SQLiteStore) getUploadInfo(ctx context.Context, userId uint64, filePat
ctx,
`select size, uploaded
from t_file_uploading
where user=? and real_path=?`,
userId, filePath,
where real_path=? and user=?`,
filePath, userId,
).Scan(&size, &uploaded)
if err != nil {
return "", 0, 0, err