"""Add fields to todo modul

Revision ID: 5169d562c728
Revises: 15133f9f1931
Create Date: 2014-01-03 17:00:55.442794

"""

# revision identifiers, used by Alembic.
revision = '5169d562c728'
down_revision = '15133f9f1931'

from alembic import op
import sqlalchemy as sa


INSERTS = """"""
DELETES = """"""


def iter_statements(stmts):
    for st in stmts.split('\n'):
        op.execute(st)


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('todos', sa.Column('deadline', sa.DateTime(), nullable=True))
    op.add_column('todos', sa.Column('description', sa.Text(), nullable=True))
    op.add_column('todos', sa.Column('name', sa.Text(), nullable=True))
    op.add_column('todos', sa.Column('priority', sa.Integer(), nullable=True))
    op.add_column('todos', sa.Column('reminddate', sa.DateTime(), nullable=True))
    op.add_column('todos', sa.Column('reminder', sa.Integer(), nullable=True))
    op.add_column('todos', sa.Column('todo_state_id', sa.Integer(), nullable=True))
    ### end Alembic commands ###
    iter_statements(INSERTS)


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('todos', 'todo_state_id')
    op.drop_column('todos', 'reminder')
    op.drop_column('todos', 'reminddate')
    op.drop_column('todos', 'priority')
    op.drop_column('todos', 'name')
    op.drop_column('todos', 'description')
    op.drop_column('todos', 'deadline')
    ### end Alembic commands ###
    iter_statements(DELETES)
