ki-backend/migrations/versions/459520b01f34_.py

36 lines
1.1 KiB
Python

"""empty message
Revision ID: 459520b01f34
Revises: 99f6b0756445
Create Date: 2021-10-03 14:45:30.389359
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '459520b01f34'
down_revision = '9183e2335b05'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("profile") as batch_op:
batch_op.add_column(sa.Column('availability_status', sa.Boolean(), nullable=False))
batch_op.add_column(sa.Column('availability_text', sa.String(length=4000), nullable=True))
batch_op.add_column(sa.Column('availability_hours_per_week', sa.Integer(), nullable=True))
batch_op.drop_column('availability')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("profile") as batch_op:
batch_op.drop_column('profile', 'availability_hours_per_week')
batch_op.drop_column('profile', 'availability_text')
batch_op.drop_column('profile', 'availability_status')
# ### end Alembic commands ###