database: fix indices post-rebase

This commit is contained in:
Jimmy Zelinskie 2016-09-23 14:28:59 -04:00
parent ca883e5662
commit a1a930b833

View file

@ -1007,6 +1007,7 @@ class ManifestLabel(BaseModel):
(('repository', 'annotated', 'label'), True),
)
class Blob(BaseModel):
""" Blob represents a content-addressable object stored outside of the database. """
digest = CharField(index=True, unique=True)
@ -1169,6 +1170,7 @@ class Tag(BaseModel):
read_slaves = (read_slave,)
indexes = (
(('repository', 'name'), False),
(('repository', 'name', 'hidden') False),
# This unique index prevents deadlocks when concurrently moving and deleting tags
(('repository', 'name', 'lifetime_end'), True),
@ -1185,7 +1187,7 @@ class BitTorrentPieces(BaseModel):
database = db
read_slaves = (read_slave,)
indexes = (
(('annotated', 'label'), True),
(('blob', 'piece_length'), True),
)