"""empty message

Revision ID: a8f40bae428a
Revises: 
Create Date: 2020-08-05 17:22:18.339839

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('User',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=80), nullable=True),
    sa.Column('email', sa.String(length=120), nullable=True),
    sa.Column('password', sa.String(length=80), nullable=True),
    sa.Column('role', sa.String(length=32), nullable=True),
    sa.Column('date_join', sa.DateTime(), nullable=True),
    sa.Column('last_login', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('username')
    )
    op.create_table('Paper',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=128), nullable=True),
    sa.Column('summary', sa.Text(), nullable=True),
    sa.Column('view', sa.Integer(), nullable=True),
    sa.Column('admire', sa.Integer(), nullable=True),
    sa.Column('upload_time', sa.DateTime(), nullable=True),
    sa.Column('update_time', sa.DateTime(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['User.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('title')
    )
    op.create_table('Comment',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('comment', sa.Text(), nullable=True),
    sa.Column('reply', sa.Integer(), nullable=True),
    sa.Column('admire', sa.Integer(), nullable=True),
    sa.Column('upload_time', sa.DateTime(), nullable=True),
    sa.Column('comment_id', sa.Integer(), nullable=True),
    sa.Column('paper_id', sa.Integer(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['comment_id'], ['Comment.id'], ),
    sa.ForeignKeyConstraint(['paper_id'], ['Paper.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['User.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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

7a4391b022c170120f30a6fe8220a0e86d554d55
<mask token>

<mask token>


def upgrade():
    op.create_table('User', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('username', sa.String(length=80), nullable=True), sa.
        Column('email', sa.String(length=120), nullable=True), sa.Column(
        'password', sa.String(length=80), nullable=True), sa.Column('role',
        sa.String(length=32), nullable=True), sa.Column('date_join', sa.
        DateTime(), nullable=True), sa.Column('last_login', sa.DateTime(),
        nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint(
        'username'))
    op.create_table('Paper', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('title', sa.String(length=128), nullable=True), sa.Column
        ('summary', sa.Text(), nullable=True), sa.Column('view', sa.Integer
        (), nullable=True), sa.Column('admire', sa.Integer(), nullable=True
        ), sa.Column('upload_time', sa.DateTime(), nullable=True), sa.
        Column('update_time', sa.DateTime(), nullable=True), sa.Column(
        'user_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint([
        'user_id'], ['User.id']), sa.PrimaryKeyConstraint('id'), sa.
        UniqueConstraint('title'))
    op.create_table('Comment', sa.Column('id', sa.Integer(), nullable=False
        ), sa.Column('comment', sa.Text(), nullable=True), sa.Column(
        'reply', sa.Integer(), nullable=True), sa.Column('admire', sa.
        Integer(), nullable=True), sa.Column('upload_time', sa.DateTime(),
        nullable=True), sa.Column('comment_id', sa.Integer(), nullable=True
        ), sa.Column('paper_id', sa.Integer(), nullable=True), sa.Column(
        'user_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint([
        'comment_id'], ['Comment.id']), sa.ForeignKeyConstraint(['paper_id'
        ], ['Paper.id']), sa.ForeignKeyConstraint(['user_id'], ['User.id']),
        sa.PrimaryKeyConstraint('id'))


def downgrade():
    op.drop_table('Comment')
    op.drop_table('Paper')
    op.drop_table('User')

<mask token>
revision = 'a8f40bae428a'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('User', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('username', sa.String(length=80), nullable=True), sa.
        Column('email', sa.String(length=120), nullable=True), sa.Column(
        'password', sa.String(length=80), nullable=True), sa.Column('role',
        sa.String(length=32), nullable=True), sa.Column('date_join', sa.
        DateTime(), nullable=True), sa.Column('last_login', sa.DateTime(),
        nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint(
        'username'))
    op.create_table('Paper', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('title', sa.String(length=128), nullable=True), sa.Column
        ('summary', sa.Text(), nullable=True), sa.Column('view', sa.Integer
        (), nullable=True), sa.Column('admire', sa.Integer(), nullable=True
        ), sa.Column('upload_time', sa.DateTime(), nullable=True), sa.
        Column('update_time', sa.DateTime(), nullable=True), sa.Column(
        'user_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint([
        'user_id'], ['User.id']), sa.PrimaryKeyConstraint('id'), sa.
        UniqueConstraint('title'))
    op.create_table('Comment', sa.Column('id', sa.Integer(), nullable=False
        ), sa.Column('comment', sa.Text(), nullable=True), sa.Column(
        'reply', sa.Integer(), nullable=True), sa.Column('admire', sa.
        Integer(), nullable=True), sa.Column('upload_time', sa.DateTime(),
        nullable=True), sa.Column('comment_id', sa.Integer(), nullable=True
        ), sa.Column('paper_id', sa.Integer(), nullable=True), sa.Column(
        'user_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint([
        'comment_id'], ['Comment.id']), sa.ForeignKeyConstraint(['paper_id'
        ], ['Paper.id']), sa.ForeignKeyConstraint(['user_id'], ['User.id']),
        sa.PrimaryKeyConstraint('id'))


def downgrade():
    op.drop_table('Comment')
    op.drop_table('Paper')
    op.drop_table('User')

<mask token>
from alembic import op
import sqlalchemy as sa
revision = 'a8f40bae428a'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('User', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('username', sa.String(length=80), nullable=True), sa.
        Column('email', sa.String(length=120), nullable=True), sa.Column(
        'password', sa.String(length=80), nullable=True), sa.Column('role',
        sa.String(length=32), nullable=True), sa.Column('date_join', sa.
        DateTime(), nullable=True), sa.Column('last_login', sa.DateTime(),
        nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint(
        'username'))
    op.create_table('Paper', sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('title', sa.String(length=128), nullable=True), sa.Column
        ('summary', sa.Text(), nullable=True), sa.Column('view', sa.Integer
        (), nullable=True), sa.Column('admire', sa.Integer(), nullable=True
        ), sa.Column('upload_time', sa.DateTime(), nullable=True), sa.
        Column('update_time', sa.DateTime(), nullable=True), sa.Column(
        'user_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint([
        'user_id'], ['User.id']), sa.PrimaryKeyConstraint('id'), sa.
        UniqueConstraint('title'))
    op.create_table('Comment', sa.Column('id', sa.Integer(), nullable=False
        ), sa.Column('comment', sa.Text(), nullable=True), sa.Column(
        'reply', sa.Integer(), nullable=True), sa.Column('admire', sa.
        Integer(), nullable=True), sa.Column('upload_time', sa.DateTime(),
        nullable=True), sa.Column('comment_id', sa.Integer(), nullable=True
        ), sa.Column('paper_id', sa.Integer(), nullable=True), sa.Column(
        'user_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint([
        'comment_id'], ['Comment.id']), sa.ForeignKeyConstraint(['paper_id'
        ], ['Paper.id']), sa.ForeignKeyConstraint(['user_id'], ['User.id']),
        sa.PrimaryKeyConstraint('id'))


def downgrade():
    op.drop_table('Comment')
    op.drop_table('Paper')
    op.drop_table('User')

"""empty message

Revision ID: a8f40bae428a
Revises: 
Create Date: 2020-08-05 17:22:18.339839

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('User',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=80), nullable=True),
    sa.Column('email', sa.String(length=120), nullable=True),
    sa.Column('password', sa.String(length=80), nullable=True),
    sa.Column('role', sa.String(length=32), nullable=True),
    sa.Column('date_join', sa.DateTime(), nullable=True),
    sa.Column('last_login', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('username')
    )
    op.create_table('Paper',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=128), nullable=True),
    sa.Column('summary', sa.Text(), nullable=True),
    sa.Column('view', sa.Integer(), nullable=True),
    sa.Column('admire', sa.Integer(), nullable=True),
    sa.Column('upload_time', sa.DateTime(), nullable=True),
    sa.Column('update_time', sa.DateTime(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['User.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('title')
    )
    op.create_table('Comment',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('comment', sa.Text(), nullable=True),
    sa.Column('reply', sa.Integer(), nullable=True),
    sa.Column('admire', sa.Integer(), nullable=True),
    sa.Column('upload_time', sa.DateTime(), nullable=True),
    sa.Column('comment_id', sa.Integer(), nullable=True),
    sa.Column('paper_id', sa.Integer(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['comment_id'], ['Comment.id'], ),
    sa.ForeignKeyConstraint(['paper_id'], ['Paper.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['User.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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