2017-10-29 13:44:37 +01:00
|
|
|
""" Set the nocase collation on the user and alias tables
|
|
|
|
|
|
|
|
Revision ID: 9c28df23f77e
|
|
|
|
Revises: c162ac88012a
|
|
|
|
Create Date: 2017-10-29 13:28:29.155754
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = '9c28df23f77e'
|
|
|
|
down_revision = 'c162ac88012a'
|
|
|
|
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
2018-11-20 14:41:17 +02:00
|
|
|
|
2018-12-10 15:01:27 +01:00
|
|
|
def upgrade():
|
2018-12-10 15:03:12 +01: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-12-10 15:03:12 +01:00
|
|
|
with op.batch_alter_table('alias') as batch:
|
2019-01-09 12:53:59 +02:00
|
|
|
batch.alter_column('email', type_=sa.String(length=255), nullable=False)
|
2017-10-29 13:44:37 +01: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)
|
2017-10-29 13:44:37 +01:00
|
|
|
with op.batch_alter_table('alias') as batch:
|
2019-01-09 12:53:59 +02:00
|
|
|
batch.alter_column('email', type_=sa.String(length=255), nullable=False)
|