"""empty message

Revision ID: 36d50521263
Revises: None
Create Date: 2014-12-07 19:55:54.317765

"""

# revision identifiers, used by Alembic.
revision = '36d50521263'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('block_item',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('alias', sa.String(length=255), nullable=True),
    sa.Column('parent_id', sa.Integer(), nullable=True),
    sa.Column('type', sa.String(length=255), nullable=True),
    sa.Column('data', sa.String(), nullable=True),
    sa.ForeignKeyConstraint(['parent_id'], ['block_item.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('page_item',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('url', sa.String(), nullable=True),
    sa.Column('meta', sa.String(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('url')
    )
    op.create_table('page_block',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('page_id', sa.Integer(), nullable=True),
    sa.Column('block_id', sa.Integer(), nullable=True),
    sa.Column('place', sa.String(), nullable=True),
    sa.ForeignKeyConstraint(['block_id'], ['block_item.id'], ),
    sa.ForeignKeyConstraint(['page_id'], ['page_item.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


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