"""Added comments to forms.

Revision ID: 3e688c191de1
Revises: 3c76c84ce8c0
Create Date: 2014-03-24 15:35:48.774585

"""

# revision identifiers, used by Alembic.
revision = '3e688c191de1'
down_revision = '3c76c84ce8c0'

from alembic import op
import sqlalchemy as sa


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


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


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('nm_form_comments',
    sa.Column('iid', sa.Integer(), nullable=True),
    sa.Column('cid', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['cid'], ['comments.id'], ),
    sa.ForeignKeyConstraint(['iid'], [u'forms.id'], )
    )
    ### end Alembic commands ###
    iter_statements(INSERTS)


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