fix(sqlite): add indexes and unique constraint
This commit is contained in:
parent
df5c820c68
commit
d97451653e
4 changed files with 37 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue