"""empty message

Revision ID: a1791a9304e5
Revises: 
Create Date: 2020-04-04 13:11:18.753474

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a1791a9304e5'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Photoalbum',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('name', sa.String(length=100), nullable=True),
    sa.Column('introduce', sa.String(length=100), nullable=True),
    sa.Column('front_cover', sa.String(length=100), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('comment',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('content', sa.Text(), nullable=True),
    sa.Column('entityOwnerId', sa.Integer(), nullable=True),
    sa.Column('entityType', sa.Integer(), nullable=True),
    sa.Column('entityId', sa.Integer(), nullable=True),
    sa.Column('changetime', sa.String(length=20), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('dynamic',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('content', sa.Text(), nullable=True),
    sa.Column('changetime', sa.String(length=20), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('feed',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('type', sa.Integer(), nullable=True),
    sa.Column('userId', sa.Integer(), nullable=True),
    sa.Column('createtime', sa.String(length=20), nullable=True),
    sa.Column('data', sa.String(length=100), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('image',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('name', sa.String(length=100), nullable=True),
    sa.Column('url', sa.String(length=100), nullable=True),
    sa.Column('changetime', sa.String(length=20), nullable=True),
    sa.Column('action', sa.Integer(), nullable=True),
    sa.Column('orig_id', sa.Integer(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('dynamic_id', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('message',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('fromId', sa.Integer(), nullable=True),
    sa.Column('toId', sa.Integer(), nullable=True),
    sa.Column('content', sa.Text(), nullable=True),
    sa.Column('createtime', sa.String(length=20), nullable=True),
    sa.Column('hasRead', sa.Integer(), nullable=True),
    sa.Column('conversationId', sa.String(length=20), nullable=True),
    sa.Column('action', sa.Integer(), nullable=True),
    sa.Column('extra', sa.String(length=20), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('user',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('username', sa.String(length=100), nullable=True),
    sa.Column('nickname', sa.String(length=100), nullable=True),
    sa.Column('password', sa.String(length=100), nullable=True),
    sa.Column('salt', sa.String(length=32), nullable=True),
    sa.Column('head_url', sa.String(length=100), nullable=True),
    sa.Column('changetime', sa.String(length=20), nullable=True),
    sa.Column('signature', sa.String(length=100), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('user')
    op.drop_table('message')
    op.drop_table('image')
    op.drop_table('feed')
    op.drop_table('dynamic')
    op.drop_table('comment')
    op.drop_table('Photoalbum')
    # ### end Alembic commands ###
