Fix the db definition for torrentinfo and add migration
This commit is contained in:
parent
476ac8cec9
commit
77aa58996a
3 changed files with 45 additions and 3 deletions
|
@ -853,9 +853,13 @@ class TorrentInfo(BaseModel):
|
|||
piece_length = IntegerField()
|
||||
pieces = Base64BinaryField()
|
||||
|
||||
indexes = (
|
||||
(('storage', 'piece_length'), True),
|
||||
)
|
||||
class Meta:
|
||||
database = db
|
||||
read_slaves = (read_slave,)
|
||||
indexes = (
|
||||
# we may want to compute the piece hashes multiple times with different piece lengths
|
||||
(('storage', 'piece_length'), True),
|
||||
)
|
||||
|
||||
|
||||
all_models = [User, Repository, Image, AccessToken, Role, RepositoryPermission, Visibility,
|
||||
|
|
Reference in a new issue