"""Google Books API

Revision ID: 576954f49932
Revises: 0f9f9eada768
Create Date: 2021-02-20 05:47:00.718039

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '576954f49932'
down_revision = '0f9f9eada768'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('Diary', schema=None) as batch_op:
        batch_op.add_column(sa.Column('book_author', sa.String(length=256), nullable=True))
        batch_op.add_column(sa.Column('book_isbn', sa.String(length=32), nullable=True))
        batch_op.add_column(sa.Column('book_subtitle', sa.String(length=256), nullable=True))
        batch_op.drop_column('book_url')

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('Diary', schema=None) as batch_op:
        batch_op.add_column(sa.Column('book_url', sa.VARCHAR(length=1024), nullable=True))
        batch_op.drop_column('book_subtitle')
        batch_op.drop_column('book_isbn')
        batch_op.drop_column('book_author')

    # ### end Alembic commands ###
