app-MAIL-temp/migrations/versions/2021_022415_e831a883153a_.py

36 lines
995 B
Python

"""empty message
Revision ID: e831a883153a
Revises: de7aa5280210
Create Date: 2021-02-24 15:39:50.029276
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e831a883153a'
down_revision = 'de7aa5280210'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.execute('UPDATE users SET include_sender_in_reverse_alias = false WHERE include_sender_in_reverse_alias IS NULL')
op.alter_column('users', 'include_sender_in_reverse_alias',
server_default='0',
existing_type=sa.BOOLEAN(),
nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('users', 'include_sender_in_reverse_alias',
existing_type=sa.BOOLEAN(),
nullable=True)
# ### end Alembic commands ###