"""information table

Revision ID: 2b7b08def94c
Revises: 26f7356f8afa
Create Date: 2018-03-20 20:55:07.767251

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2b7b08def94c'
down_revision = '26f7356f8afa'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('information',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=15), nullable=True),
    sa.Column('surname', sa.String(length=20), nullable=True),
    sa.Column('domicile', sa.String(length=25), nullable=True),
    sa.Column('tenth', sa.Integer(), nullable=True),
    sa.Column('twelfth', sa.Integer(), nullable=True),
    sa.Column('address', sa.String(length=180), nullable=True),
    sa.Column('university', sa.Integer(), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_information_domicile'), 'information', ['domicile'], unique=False)
    op.create_index(op.f('ix_information_name'), 'information', ['name'], unique=False)
    op.create_index(op.f('ix_information_surname'), 'information', ['surname'], unique=False)
    op.create_index(op.f('ix_information_tenth'), 'information', ['tenth'], unique=False)
    op.create_index(op.f('ix_information_timestamp'), 'information', ['timestamp'], unique=False)
    op.create_index(op.f('ix_information_twelfth'), 'information', ['twelfth'], unique=False)
    op.create_index(op.f('ix_information_university'), 'information', ['university'], unique=False)
    op.drop_index('ix_post_timestamp', table_name='post')
    op.drop_table('post')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('post',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('body', sa.VARCHAR(length=160), nullable=True),
    sa.Column('timestamp', sa.DATETIME(), nullable=True),
    sa.Column('user_id', sa.INTEGER(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index('ix_post_timestamp', 'post', ['timestamp'], unique=False)
    op.drop_index(op.f('ix_information_university'), table_name='information')
    op.drop_index(op.f('ix_information_twelfth'), table_name='information')
    op.drop_index(op.f('ix_information_timestamp'), table_name='information')
    op.drop_index(op.f('ix_information_tenth'), table_name='information')
    op.drop_index(op.f('ix_information_surname'), table_name='information')
    op.drop_index(op.f('ix_information_name'), table_name='information')
    op.drop_index(op.f('ix_information_domicile'), table_name='information')
    op.drop_table('information')
    # ### end Alembic commands ###
