<reponame>dmitriykel/friends_surprise<gh_stars>1-10
"""add img_url and open_date to gifts

Revision ID: 47f1d728ec56
Revises: <PASSWORD>
Create Date: 2019-06-19 10:20:57.787300

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '47f1d728ec56'
down_revision = '3<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('gifts', sa.Column('img_url', sa.String(length=128), nullable=True))
    op.add_column('gifts', sa.Column('open_date', sa.DateTime(), nullable=True))
    op.create_index(op.f('ix_gifts_open_date'), 'gifts', ['open_date'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_gifts_open_date'), table_name='gifts')
    op.drop_column('gifts', 'open_date')
    op.drop_column('gifts', 'img_url')
    # ### end Alembic commands ###

"""add img_url and open_date to gifts

Revision ID: 47f1d728ec56
Revises: <PASSWORD>
Create Date: 2019-06-19 10:20:57.787300

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '47f1d728ec56'
down_revision = '3<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('gifts', sa.Column('img_url', sa.String(length=128), nullable=True))
    op.add_column('gifts', sa.Column('open_date', sa.DateTime(), nullable=True))
    op.create_index(op.f('ix_gifts_open_date'), 'gifts', ['open_date'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_gifts_open_date'), table_name='gifts')
    op.drop_column('gifts', 'open_date')
    op.drop_column('gifts', 'img_url')
    # ### end Alembic commands ###
add img_url and open_date to gifts  Revision ID: 47f1d728ec56 Revises: <PASSWORD> Create Date: 2019-06-19 10:20:57.787300 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###