Commit 33a64ede authored by Aurélien Bompard's avatar Aurélien Bompard Committed by Barry Warsaw

Add a couple indexes on Member

parent 4eaed33f
Pipeline #537217 passed with stage
"""Add indexes on the Member table.
Revision ID: 3e09bb4a5dc
Revises: 33bc0099223
Create Date: 2015-12-11 19:16:57.030395
"""
# revision identifiers, used by Alembic.
revision = '3e09bb4a5dc'
down_revision = '33bc0099223'
from alembic import op
def upgrade():
op.create_index(
op.f('ix_member_list_id'), 'member', ['list_id'], unique=False)
op.create_index(
op.f('ix_member_role'), 'member', ['role'], unique=False)
def downgrade():
op.drop_index(op.f('ix_member_role'), table_name='member')
op.drop_index(op.f('ix_member_list_id'), table_name='member')
......@@ -53,8 +53,8 @@ class Member(Model):
id = Column(Integer, primary_key=True)
_member_id = Column(UUID)
role = Column(Enum(MemberRole))
list_id = Column(Unicode)
role = Column(Enum(MemberRole), index=True)
list_id = Column(Unicode, index=True)
moderation_action = Column(Enum(Action))
address_id = Column(Integer, ForeignKey('address.id'), index=True)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment