mirror of
https://github.com/simple-login/app.git
synced 2024-11-14 08:01:13 +01:00
31 lines
862 B
Python
31 lines
862 B
Python
"""empty message
|
|
|
|
Revision ID: b0e9a389939a
|
|
Revises: 84471852b610
|
|
Create Date: 2020-09-12 11:18:40.262432
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'b0e9a389939a'
|
|
down_revision = '84471852b610'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('users', sa.Column('newsletter_alias_id', sa.Integer(), nullable=True))
|
|
op.create_foreign_key(None, 'users', 'alias', ['newsletter_alias_id'], ['id'], ondelete='SET NULL')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(None, 'users', type_='foreignkey')
|
|
op.drop_column('users', 'newsletter_alias_id')
|
|
# ### end Alembic commands ###
|