"""empty message

Revision ID: 1817f77d89ba
Revises: b6bd8971550d
Create Date: 2019-07-30 19:35:19.598413

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = '1817f77d89ba'
down_revision = 'b6bd8971550d'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('bbs_replies',
    sa.Column('rid', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('rcontent', sa.String(length=20000), nullable=False),
    sa.Column('rfloor', sa.Integer(), autoincrement=True, nullable=True),
    sa.Column('ruid', sa.Integer(), nullable=False),
    sa.Column('rdatetime', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['ruid'], ['bbs_user.uid'], ),
    sa.PrimaryKeyConstraint('rid')
    )
    op.drop_constraint('bbs_posts_ibfk_1', 'bbs_posts', type_='foreignkey')
    op.alter_column('bbs_user', 'upassword',
               existing_type=mysql.VARCHAR(length=256),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('bbs_user', 'upassword',
               existing_type=mysql.VARCHAR(length=256),
               nullable=True)
    op.create_foreign_key('bbs_posts_ibfk_1', 'bbs_posts', 'bbs_user', ['plastreplyid'], ['uid'])
    op.drop_table('bbs_replies')
    # ### end Alembic commands ###

c23a79d9382cb27c6674a2ff47fb31cf0506f282
<mask token>


def downgrade():
    op.alter_column('bbs_user', 'upassword', existing_type=mysql.VARCHAR(
        length=256), nullable=True)
    op.create_foreign_key('bbs_posts_ibfk_1', 'bbs_posts', 'bbs_user', [
        'plastreplyid'], ['uid'])
    op.drop_table('bbs_replies')

<mask token>


def upgrade():
    op.create_table('bbs_replies', sa.Column('rid', sa.Integer(),
        autoincrement=True, nullable=False), sa.Column('rcontent', sa.
        String(length=20000), nullable=False), sa.Column('rfloor', sa.
        Integer(), autoincrement=True, nullable=True), sa.Column('ruid', sa
        .Integer(), nullable=False), sa.Column('rdatetime', sa.DateTime(),
        nullable=True), sa.ForeignKeyConstraint(['ruid'], ['bbs_user.uid']),
        sa.PrimaryKeyConstraint('rid'))
    op.drop_constraint('bbs_posts_ibfk_1', 'bbs_posts', type_='foreignkey')
    op.alter_column('bbs_user', 'upassword', existing_type=mysql.VARCHAR(
        length=256), nullable=False)


def downgrade():
    op.alter_column('bbs_user', 'upassword', existing_type=mysql.VARCHAR(
        length=256), nullable=True)
    op.create_foreign_key('bbs_posts_ibfk_1', 'bbs_posts', 'bbs_user', [
        'plastreplyid'], ['uid'])
    op.drop_table('bbs_replies')

<mask token>
revision = '1817f77d89ba'
down_revision = 'b6bd8971550d'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('bbs_replies', sa.Column('rid', sa.Integer(),
        autoincrement=True, nullable=False), sa.Column('rcontent', sa.
        String(length=20000), nullable=False), sa.Column('rfloor', sa.
        Integer(), autoincrement=True, nullable=True), sa.Column('ruid', sa
        .Integer(), nullable=False), sa.Column('rdatetime', sa.DateTime(),
        nullable=True), sa.ForeignKeyConstraint(['ruid'], ['bbs_user.uid']),
        sa.PrimaryKeyConstraint('rid'))
    op.drop_constraint('bbs_posts_ibfk_1', 'bbs_posts', type_='foreignkey')
    op.alter_column('bbs_user', 'upassword', existing_type=mysql.VARCHAR(
        length=256), nullable=False)


def downgrade():
    op.alter_column('bbs_user', 'upassword', existing_type=mysql.VARCHAR(
        length=256), nullable=True)
    op.create_foreign_key('bbs_posts_ibfk_1', 'bbs_posts', 'bbs_user', [
        'plastreplyid'], ['uid'])
    op.drop_table('bbs_replies')

<mask token>
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
revision = '1817f77d89ba'
down_revision = 'b6bd8971550d'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('bbs_replies', sa.Column('rid', sa.Integer(),
        autoincrement=True, nullable=False), sa.Column('rcontent', sa.
        String(length=20000), nullable=False), sa.Column('rfloor', sa.
        Integer(), autoincrement=True, nullable=True), sa.Column('ruid', sa
        .Integer(), nullable=False), sa.Column('rdatetime', sa.DateTime(),
        nullable=True), sa.ForeignKeyConstraint(['ruid'], ['bbs_user.uid']),
        sa.PrimaryKeyConstraint('rid'))
    op.drop_constraint('bbs_posts_ibfk_1', 'bbs_posts', type_='foreignkey')
    op.alter_column('bbs_user', 'upassword', existing_type=mysql.VARCHAR(
        length=256), nullable=False)


def downgrade():
    op.alter_column('bbs_user', 'upassword', existing_type=mysql.VARCHAR(
        length=256), nullable=True)
    op.create_foreign_key('bbs_posts_ibfk_1', 'bbs_posts', 'bbs_user', [
        'plastreplyid'], ['uid'])
    op.drop_table('bbs_replies')

"""empty message

Revision ID: 1817f77d89ba
Revises: b6bd8971550d
Create Date: 2019-07-30 19:35:19.598413

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = '1817f77d89ba'
down_revision = 'b6bd8971550d'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('bbs_replies',
    sa.Column('rid', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('rcontent', sa.String(length=20000), nullable=False),
    sa.Column('rfloor', sa.Integer(), autoincrement=True, nullable=True),
    sa.Column('ruid', sa.Integer(), nullable=False),
    sa.Column('rdatetime', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['ruid'], ['bbs_user.uid'], ),
    sa.PrimaryKeyConstraint('rid')
    )
    op.drop_constraint('bbs_posts_ibfk_1', 'bbs_posts', type_='foreignkey')
    op.alter_column('bbs_user', 'upassword',
               existing_type=mysql.VARCHAR(length=256),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('bbs_user', 'upassword',
               existing_type=mysql.VARCHAR(length=256),
               nullable=True)
    op.create_foreign_key('bbs_posts_ibfk_1', 'bbs_posts', 'bbs_user', ['plastreplyid'], ['uid'])
    op.drop_table('bbs_replies')
    # ### end Alembic commands ###
