boartty/gertty/alembic/versions/2a11dd14665_fix_account_table.py
Monty Taylor d2b83ab25d Quote identifiers in migrations
If a user is crazy enough to want to do something like run gertty
on top of MySQL, most things work ... except for a few places where
bare use of SQL in the migrations bypass identifier quoting.

Change-Id: I0145389d645ca647d2e599c79f5266f60dec85f4
2014-09-07 15:57:14 -07:00

27 lines
661 B
Python

"""fix account table
Revision ID: 2a11dd14665
Revises: 4cc9c46f9d8b
Create Date: 2014-08-20 13:07:25.079603
"""
# revision identifiers, used by Alembic.
revision = '2a11dd14665'
down_revision = '4cc9c46f9d8b'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_index('ix_account_name', 'account')
op.drop_index('ix_account_username', 'account')
op.drop_index('ix_account_email', 'account')
op.create_index(op.f('ix_account_name'), 'account', ['name'])
op.create_index(op.f('ix_account_username'), 'account', ['username'])
op.create_index(op.f('ix_account_email'), 'account', ['email'])
def downgrade():
pass