forked from kompetenzinventar/ki-backend
fix migrations issues, richtige variablen bennung
This commit is contained in:
@ -11,24 +11,25 @@ import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '459520b01f34'
|
||||
down_revision = '99f6b0756445'
|
||||
down_revision = '9183e2335b05'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('profile', sa.Column('availabilityStatus', sa.Boolean(), nullable=True))
|
||||
op.add_column('profile', sa.Column('availabilityText', sa.String(length=4000), nullable=True))
|
||||
op.add_column('profile', sa.Column('availabilityHoursPerWeek', sa.Integer(), nullable=True))
|
||||
op.drop_column('profile', 'availability')
|
||||
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! ###
|
||||
op.add_column('profile', sa.Column('availability', sa.VARCHAR(length=4000), nullable=True))
|
||||
op.drop_column('profile', 'availabilityHoursPerWeek')
|
||||
op.drop_column('profile', 'availabilityText')
|
||||
op.drop_column('profile', 'availabilityStatus')
|
||||
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 ###
|
||||
|
@ -1,24 +0,0 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 99f6b0756445
|
||||
Revises: 9183e2335b05
|
||||
Create Date: 2021-10-03 14:45:10.980556
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '99f6b0756445'
|
||||
down_revision = '9183e2335b05'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
pass
|
||||
|
||||
|
||||
def downgrade():
|
||||
pass
|
Reference in New Issue
Block a user