"Fossies" - the Fresh Open Source Software Archive

Member "mailman-3.3.7/src/mailman/database/alembic/versions/3e09bb4a5dc_member_indexes.py" (10 Nov 2022, 595 Bytes) of package /linux/misc/mailman-3.3.7.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "3e09bb4a5dc_member_indexes.py" see the Fossies "Dox" file reference documentation.

    1 """Add indexes on the Member table.
    2 
    3 Revision ID: 3e09bb4a5dc
    4 Revises: 33bc0099223
    5 Create Date: 2015-12-11 19:16:57.030395
    6 
    7 """
    8 
    9 from alembic import op
   10 
   11 
   12 # Revision identifiers, used by Alembic.
   13 revision = '3e09bb4a5dc'
   14 down_revision = '33bc0099223'
   15 
   16 
   17 def upgrade():
   18     op.create_index(
   19         op.f('ix_member_list_id'), 'member', ['list_id'], unique=False)
   20     op.create_index(
   21         op.f('ix_member_role'), 'member', ['role'], unique=False)
   22 
   23 
   24 def downgrade():
   25     op.drop_index(op.f('ix_member_role'), table_name='member')
   26     op.drop_index(op.f('ix_member_list_id'), table_name='member')