"""Add version table for versioned mixin

Revision ID: 1a78ab0751fb
Revises: 4ee41432a71
Create Date: 2014-02-04 17:52:16.821497

"""

# revision identifiers, used by Alembic.
revision = '1a78ab0751fb'
down_revision = '4ee41432a71'

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.create_table('versions',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('values', sa.Text(), nullable=True),
    sa.Column('author', sa.Text(), nullable=True),
    sa.Column('date', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###
    iter_statements(INSERTS)


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