best migration and doku
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
scammo 2021-10-11 18:22:33 +02:00
parent 55b83f6efa
commit 2387fb5e19
2 changed files with 5 additions and 6 deletions

View File

@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
Ggf. vorher aufräumen
```
rm data/ki.sqlite
rm storage/ki.sqlite
```
```

View File

@ -19,17 +19,16 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("profile") as batch_op:
batch_op.alter_column('availability', new_column_name='availability_text')
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')
batch_op.alter_column('availability_text', new_column_name='availability')
batch_op.drop_column('availability_hours_per_week')
batch_op.drop_column('availability_status')
# ### end Alembic commands ###