"""Create sketch_pad and code_block tables.

Revision ID: eb93fb4715f4
Revises: f8aaa4f49c68
Create Date: 2019-01-08 23:32:53.897516

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'eb93fb4715f4'
down_revision = 'f8aaa4f49c68'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('sketch_pad',
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('title', sa.String(length=255), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('code_block',
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('code', sa.TEXT(), nullable=True),
    sa.Column('sketch_pad_id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.ForeignKeyConstraint(['sketch_pad_id'], ['sketch_pad.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('code_block')
    op.drop_table('sketch_pad')
    # ### end Alembic commands ###
