"""added columns to Places

Revision ID: cba44d27f422
Revises: 061ea741f852
Create Date: 2023-06-28 15:56:11.475592

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'cba44d27f422'
down_revision = '061ea741f852'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('places', schema=None) as batch_op:
        batch_op.add_column(sa.Column('website', sa.String(), nullable=True))
        batch_op.add_column(sa.Column('photo', sa.String(), nullable=True))
        batch_op.add_column(sa.Column('price_level', sa.Integer(), nullable=True))
        batch_op.add_column(sa.Column('user_ratings_total', sa.Integer(), nullable=True))
        batch_op.add_column(sa.Column('rating', sa.Float(), nullable=True))

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('places', schema=None) as batch_op:
        batch_op.drop_column('rating')
        batch_op.drop_column('user_ratings_total')
        batch_op.drop_column('price_level')
        batch_op.drop_column('photo')
        batch_op.drop_column('website')

    # ### end Alembic commands ###
