"""empty message

Revision ID: fe271dd8a07
Revises: None
Create Date: 2015-07-12 10:49:57.076052

"""

# revision identifiers, used by Alembic.
revision = 'fe271dd8a07'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('article_state',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('action',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('description', sa.String(), nullable=True),
    sa.Column('start_state_id', sa.Integer(), nullable=False),
    sa.Column('end_state_id', sa.Integer(), nullable=False),
    sa.Column('timestamp', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['end_state_id'], ['article_state.id'], ),
    sa.ForeignKeyConstraint(['start_state_id'], ['article_state.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('person',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('email', sa.String(), nullable=True),
    sa.Column('name', sa.String(), nullable=True),
    sa.Column('desk', sa.String(), nullable=True),
    sa.Column('job_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['job_id'], ['article_state.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email')
    )
    op.create_table('article',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('reporter', sa.Integer(), nullable=False),
    sa.Column('editor1', sa.Integer(), nullable=False),
    sa.Column('editor2', sa.Integer(), nullable=False),
    sa.Column('print_headline', sa.String(), nullable=True),
    sa.Column('digital_headline', sa.String(), nullable=True),
    sa.Column('mobile_headline', sa.String(), nullable=True),
    sa.Column('byline', sa.String(), nullable=True),
    sa.Column('summary', sa.String(), nullable=True),
    sa.Column('body', sa.String(), nullable=True),
    sa.Column('photo', sa.String(), nullable=True),
    sa.Column('section', sa.String(), nullable=True),
    sa.Column('tweet', sa.String(), nullable=True),
    sa.Column('dateline', sa.String(), nullable=True),
    sa.ForeignKeyConstraint(['editor1'], ['person.id'], ),
    sa.ForeignKeyConstraint(['editor2'], ['person.id'], ),
    sa.ForeignKeyConstraint(['reporter'], ['person.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('article')
    op.drop_table('person')
    op.drop_table('action')
    op.drop_table('article_state')
    ### end Alembic commands ###
