"""initial migratio

Revision ID: de4d95884074
Revises: 
Create Date: 2017-01-20 16:19:57.296000

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('essays',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('tittle', sa.String(length=300), nullable=True),
    sa.Column('body', sa.Text(), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_essays_timestamp'), 'essays', ['timestamp'], unique=False)
    op.create_index(op.f('ix_essays_tittle'), 'essays', ['tittle'], unique=False)
    op.create_table('kinds',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('kinds')
    op.drop_index(op.f('ix_essays_tittle'), table_name='essays')
    op.drop_index(op.f('ix_essays_timestamp'), table_name='essays')
    op.drop_table('essays')
    # ### end Alembic commands ###
