"""Added org

Revision ID: 636e6665f57f
Revises: d0832c7bd479
Create Date: 2016-04-24 09:36:00.911250

"""

# revision identifiers, used by Alembic.
revision = '636e6665f57f'
down_revision = 'd0832c7bd479'

from alembic import op
import sqlalchemy as sa

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('orgs',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.VARCHAR(255), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    )

    op.create_table('answers',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('org_id', sa.Integer(), nullable=False),
    sa.Column('question', sa.VARCHAR(255), nullable=False),
    sa.Column('answer', sa.VARCHAR(1023), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.ForeignKeyConstraint(['org_id'], ['orgs.id'], onupdate='CASCADE', ondelete='CASCADE'),
    )
    ### end Alembic commands ###

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

46b23bbae2c50f77c4c8b9499be2836367068984
<mask token>


def downgrade():
    op.drop_table('answers')
    op.drop_table('orgs')

<mask token>


def upgrade():
    op.create_table('orgs', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('name', sa.VARCHAR(255), nullable=False), sa.
        PrimaryKeyConstraint('id'))
    op.create_table('answers', sa.Column('id', sa.Integer(), nullable=False
        ), sa.Column('org_id', sa.Integer(), nullable=False), sa.Column(
        'question', sa.VARCHAR(255), nullable=False), sa.Column('answer',
        sa.VARCHAR(1023), nullable=False), sa.PrimaryKeyConstraint('id'),
        sa.ForeignKeyConstraint(['org_id'], ['orgs.id'], onupdate='CASCADE',
        ondelete='CASCADE'))


def downgrade():
    op.drop_table('answers')
    op.drop_table('orgs')

<mask token>
revision = '636e6665f57f'
down_revision = 'd0832c7bd479'
<mask token>


def upgrade():
    op.create_table('orgs', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('name', sa.VARCHAR(255), nullable=False), sa.
        PrimaryKeyConstraint('id'))
    op.create_table('answers', sa.Column('id', sa.Integer(), nullable=False
        ), sa.Column('org_id', sa.Integer(), nullable=False), sa.Column(
        'question', sa.VARCHAR(255), nullable=False), sa.Column('answer',
        sa.VARCHAR(1023), nullable=False), sa.PrimaryKeyConstraint('id'),
        sa.ForeignKeyConstraint(['org_id'], ['orgs.id'], onupdate='CASCADE',
        ondelete='CASCADE'))


def downgrade():
    op.drop_table('answers')
    op.drop_table('orgs')

<mask token>
revision = '636e6665f57f'
down_revision = 'd0832c7bd479'
from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table('orgs', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('name', sa.VARCHAR(255), nullable=False), sa.
        PrimaryKeyConstraint('id'))
    op.create_table('answers', sa.Column('id', sa.Integer(), nullable=False
        ), sa.Column('org_id', sa.Integer(), nullable=False), sa.Column(
        'question', sa.VARCHAR(255), nullable=False), sa.Column('answer',
        sa.VARCHAR(1023), nullable=False), sa.PrimaryKeyConstraint('id'),
        sa.ForeignKeyConstraint(['org_id'], ['orgs.id'], onupdate='CASCADE',
        ondelete='CASCADE'))


def downgrade():
    op.drop_table('answers')
    op.drop_table('orgs')

"""Added org

Revision ID: 636e6665f57f
Revises: d0832c7bd479
Create Date: 2016-04-24 09:36:00.911250

"""

# revision identifiers, used by Alembic.
revision = '636e6665f57f'
down_revision = 'd0832c7bd479'

from alembic import op
import sqlalchemy as sa

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('orgs',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.VARCHAR(255), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    )

    op.create_table('answers',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('org_id', sa.Integer(), nullable=False),
    sa.Column('question', sa.VARCHAR(255), nullable=False),
    sa.Column('answer', sa.VARCHAR(1023), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.ForeignKeyConstraint(['org_id'], ['orgs.id'], onupdate='CASCADE', ondelete='CASCADE'),
    )
    ### end Alembic commands ###

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