"""group_validation_rule

Revision: 0084
Revision ID: 427a0e562031
Revises: 57af91cc668a
Create Date: 2017-02-16 11:30:56.009837

"""

# revision identifiers, used by Alembic.
revision = '427a0e562031'
down_revision = '57af91cc668a'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('card_groups', sa.Column('validation_rule', sa.String(), nullable=True))
    op.create_index(op.f('ix_card_groups_validation_rule'), 'card_groups', ['validation_rule'], unique=False)


def downgrade():
    op.drop_index(op.f('ix_card_groups_validation_rule'), table_name='card_groups')
    op.drop_column('card_groups', 'validation_rule')
