From a1a930b83308d942bd1b62df0379ff47b64bd4a0 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 23 Sep 2016 14:28:59 -0400 Subject: [PATCH] database: fix indices post-rebase --- data/database.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/database.py b/data/database.py index f3c5912b8..d93bba30f 100644 --- a/data/database.py +++ b/data/database.py @@ -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), )