"""returned the foreign key

Revision ID: 61a8e0633113
Revises: 9e8f72c71fae
Create Date: 2021-08-29 15:16:00.692793

"""

# revision identifiers, used by Alembic.
revision = '61a8e0633113'
down_revision = '9e8f72c71fae'

from alembic import op
import sqlalchemy as sa


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('blogs', sa.Column('user_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'blogs', 'users', ['user_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'blogs', type_='foreignkey')
    op.drop_column('blogs', 'user_id')
    # ### end Alembic commands ###
