Fix the db definition for torrentinfo and add migration

This commit is contained in:
Jake Moshenko 2016-01-06 13:52:27 -05:00
parent 476ac8cec9
commit 77aa58996a
3 changed files with 45 additions and 3 deletions

View file

@ -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,