data.database: rm tag_kind from Tag indexes

These shouldn't be necessary.
This commit is contained in:
Jimmy Zelinskie 2017-03-16 17:20:54 -04:00
parent 0e32e77e99
commit c915a40531
2 changed files with 6 additions and 6 deletions

View file

@ -1282,10 +1282,10 @@ class Tag(BaseModel):
database = db
read_slaves = (read_slave,)
indexes = (
(('repository', 'name', 'tag_kind'), False),
(('repository', 'name', 'hidden', 'tag_kind'), False),
(('repository', 'name'), False),
(('repository', 'name', 'hidden'), False),
# This unique index prevents deadlocks when concurrently moving and deleting tags
(('repository', 'name', 'lifetime_end', 'tag_kind'), True),
(('repository', 'name', 'lifetime_end'), True),
)

View file

@ -245,9 +245,9 @@ def upgrade(tables):
op.create_index('tag_linked_tag_id', 'tag', ['linked_tag_id'], unique=False)
op.create_index('tag_manifest_list_id', 'tag', ['manifest_list_id'], unique=False)
op.create_index('tag_repository_id', 'tag', ['repository_id'], unique=False)
op.create_index('tag_repository_id_name_hidden_tag_kind_id', 'tag', ['repository_id', 'name', 'hidden', 'tag_kind_id'], unique=False)
op.create_index('tag_repository_id_name_lifetime_end_tag_kind_id', 'tag', ['repository_id', 'name', 'lifetime_end', 'tag_kind_id'], unique=True)
op.create_index('tag_repository_id_name_tag_kind_id', 'tag', ['repository_id', 'name', 'tag_kind_id'], unique=False)
op.create_index('tag_repository_id_name_hidden', 'tag', ['repository_id', 'name', 'hidden'], unique=False)
op.create_index('tag_repository_id_name_lifetime_end', 'tag', ['repository_id', 'name', 'lifetime_end'], unique=True)
op.create_index('tag_repository_id_name', 'tag', ['repository_id', 'name'], unique=False)
op.create_index('tag_tag_kind_id', 'tag', ['tag_kind_id'], unique=False)
op.create_table(