2018-04-21 13:25:48 +02:00
|
|
|
""" Enforce the nocase collation on the email table
|
|
|
|
|
|
|
|
Revision ID: 049fed905da7
|
|
|
|
Revises: 49d77a93118e
|
|
|
|
Create Date: 2018-04-21 13:23:56.571524
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = '049fed905da7'
|
|
|
|
down_revision = '49d77a93118e'
|
|
|
|
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
2018-11-20 14:41:17 +02:00
|
|
|
|
2018-12-10 16:01:27 +02:00
|
|
|
def upgrade():
|
2018-12-10 16:03:12 +02:00
|
|
|
with op.batch_alter_table('user') as batch:
|
2019-01-09 12:53:59 +02:00
|
|
|
batch.alter_column('email', type_=sa.String(length=255), nullable=False)
|
2018-04-21 13:25:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
with op.batch_alter_table('user') as batch:
|
2019-01-09 12:53:59 +02:00
|
|
|
batch.alter_column('email', type_=sa.String(length=255), nullable=False)
|
2018-04-21 13:25:48 +02:00
|
|
|
|