"""Moved ip from url to view

Revision ID: 01c43aee94da
Revises: 7f559bb24ca4
Create Date: 2021-08-20 23:46:23.305912

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "01c43aee94da"
down_revision = "7f559bb24ca4"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("urls", "ip")
    op.add_column("views", sa.Column("ip", sa.String(length=31), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("views", "ip")
    op.add_column("urls", sa.Column("ip", sa.VARCHAR(length=31), nullable=True))
    # ### end Alembic commands ###
