"""optional category

Revision ID: 5386fdc4fa3c
Revises: c326615fb761
Create Date: 2021-02-22 06:52:42.475177

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '5386fdc4fa3c'
down_revision = 'c326615fb761'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('OptionalCategory',
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('optional_category', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=128), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['User.id'], ),
    sa.PrimaryKeyConstraint('user_id', 'optional_category')
    )
    op.add_column('Diary', sa.Column('optional_category', sa.Integer(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('Diary', 'optional_category')
    op.drop_table('OptionalCategory')
    # ### end Alembic commands ###

1b2a2395658a41d1c8929f439b72fde2ca52258b
<mask token>

<mask token>


def upgrade():
    op.create_table('OptionalCategory', sa.Column('user_id', sa.Integer(),
        nullable=False), sa.Column('optional_category', sa.Integer(),
        nullable=False), sa.Column('name', sa.String(length=128), nullable=
        True), sa.ForeignKeyConstraint(['user_id'], ['User.id']), sa.
        PrimaryKeyConstraint('user_id', 'optional_category'))
    op.add_column('Diary', sa.Column('optional_category', sa.Integer(),
        nullable=True))


def downgrade():
    op.drop_column('Diary', 'optional_category')
    op.drop_table('OptionalCategory')

<mask token>
revision = '5386fdc4fa3c'
down_revision = 'c326615fb761'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('OptionalCategory', sa.Column('user_id', sa.Integer(),
        nullable=False), sa.Column('optional_category', sa.Integer(),
        nullable=False), sa.Column('name', sa.String(length=128), nullable=
        True), sa.ForeignKeyConstraint(['user_id'], ['User.id']), sa.
        PrimaryKeyConstraint('user_id', 'optional_category'))
    op.add_column('Diary', sa.Column('optional_category', sa.Integer(),
        nullable=True))


def downgrade():
    op.drop_column('Diary', 'optional_category')
    op.drop_table('OptionalCategory')

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


def upgrade():
    op.create_table('OptionalCategory', sa.Column('user_id', sa.Integer(),
        nullable=False), sa.Column('optional_category', sa.Integer(),
        nullable=False), sa.Column('name', sa.String(length=128), nullable=
        True), sa.ForeignKeyConstraint(['user_id'], ['User.id']), sa.
        PrimaryKeyConstraint('user_id', 'optional_category'))
    op.add_column('Diary', sa.Column('optional_category', sa.Integer(),
        nullable=True))


def downgrade():
    op.drop_column('Diary', 'optional_category')
    op.drop_table('OptionalCategory')

"""optional category

Revision ID: 5386fdc4fa3c
Revises: c326615fb761
Create Date: 2021-02-22 06:52:42.475177

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '5386fdc4fa3c'
down_revision = 'c326615fb761'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('OptionalCategory',
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('optional_category', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=128), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['User.id'], ),
    sa.PrimaryKeyConstraint('user_id', 'optional_category')
    )
    op.add_column('Diary', sa.Column('optional_category', sa.Integer(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('Diary', 'optional_category')
    op.drop_table('OptionalCategory')
    # ### end Alembic commands ###
