"""empty message

Revision ID: 4c5d07b7cf49
Revises: None
Create Date: 2014-09-26 14:03:38.977000

"""

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

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('user',
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=255), nullable=True),
    sa.Column('email', sa.String(length=255), nullable=True),
    sa.Column('password', sa.String(length=255), nullable=True),
    sa.Column('place_name', sa.String(length=255), nullable=True),
    sa.PrimaryKeyConstraint('user_id')
    )
    op.create_table('article',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=255), nullable=True),
    sa.Column('photo', sa.Text(length=255), nullable=True),
    sa.Column('content', sa.Text(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('category', sa.String(length=255), nullable=True),
    sa.Column('date_created', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id', 'user_id')
    )
    op.create_table('inspire',
    sa.Column('id_I', sa.Integer(), nullable=False),
    sa.Column('A_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['A_id'], ['article.id'], ),
    sa.PrimaryKeyConstraint('id_I')
    )
    op.create_table('process',
    sa.Column('id_P', sa.Integer(), nullable=False),
    sa.Column('content', sa.Text(), nullable=True),
    sa.Column('A_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['A_id'], ['article.id'], ),
    sa.PrimaryKeyConstraint('id_P')
    )
    op.create_table('comment',
    sa.Column('id_C', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('content', sa.Text(), nullable=True),
    sa.Column('A_id', sa.Integer(), nullable=True),
    sa.Column('date_created', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['A_id'], ['article.id'], ),
    sa.PrimaryKeyConstraint('id_C', 'user_id')
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('comment')
    op.drop_table('process')
    op.drop_table('inspire')
    op.drop_table('article')
    op.drop_table('user')
    ### end Alembic commands ###
