mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 23:34:05 +08:00
add migration to set GenEmail.mailbox_id non-nullable
This commit is contained in:
parent
32713b5fc1
commit
9ad2a80d36
1 changed files with 33 additions and 0 deletions
33
migrations/versions/2020_030521_235355381f53_.py
Normal file
33
migrations/versions/2020_030521_235355381f53_.py
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 235355381f53
|
||||||
|
Revises: 7eef64ffb398
|
||||||
|
Create Date: 2020-03-05 21:37:42.266722
|
||||||
|
|
||||||
|
"""
|
||||||
|
import sqlalchemy_utils
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '235355381f53'
|
||||||
|
down_revision = '7eef64ffb398'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.alter_column('gen_email', 'mailbox_id',
|
||||||
|
existing_type=sa.INTEGER(),
|
||||||
|
nullable=False)
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.alter_column('gen_email', 'mailbox_id',
|
||||||
|
existing_type=sa.INTEGER(),
|
||||||
|
nullable=True)
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Reference in a new issue