2021-10-04 18:10:31 +02:00
|
|
|
"""empty message
|
|
|
|
|
|
|
|
Revision ID: 459520b01f34
|
2021-10-07 08:08:50 +02:00
|
|
|
Revises: 9183e2335b05
|
2021-10-04 18:10:31 +02:00
|
|
|
Create Date: 2021-10-03 14:45:30.389359
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
2021-10-11 18:42:20 +02:00
|
|
|
from sqlalchemy.sql import expression
|
2021-10-04 18:10:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = '459520b01f34'
|
2021-10-04 19:25:24 +02:00
|
|
|
down_revision = '9183e2335b05'
|
2021-10-04 18:10:31 +02:00
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2021-10-04 19:25:24 +02:00
|
|
|
with op.batch_alter_table("profile") as batch_op:
|
2021-10-11 18:22:33 +02:00
|
|
|
batch_op.alter_column('availability', new_column_name='availability_text')
|
2021-10-11 18:42:20 +02:00
|
|
|
batch_op.add_column(sa.Column('availability_status', sa.Boolean(), server_default=expression.true(), nullable=False))
|
2021-10-04 19:25:24 +02:00
|
|
|
batch_op.add_column(sa.Column('availability_hours_per_week', sa.Integer(), nullable=True))
|
2021-10-04 18:10:31 +02:00
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2021-10-04 19:25:24 +02:00
|
|
|
with op.batch_alter_table("profile") as batch_op:
|
2021-10-11 18:22:33 +02:00
|
|
|
batch_op.alter_column('availability_text', new_column_name='availability')
|
|
|
|
batch_op.drop_column('availability_hours_per_week')
|
|
|
|
batch_op.drop_column('availability_status')
|
2021-10-04 18:10:31 +02:00
|
|
|
# ### end Alembic commands ###
|