From 2387fb5e19abb35d8eeeb12e5edd6641ccfcbfa2 Mon Sep 17 00:00:00 2001 From: scammo Date: Mon, 11 Oct 2021 18:22:33 +0200 Subject: [PATCH] best migration and doku --- README.md | 2 +- migrations/versions/459520b01f34_.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c5d48b6..c3863c9 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later Ggf. vorher aufräumen ``` -rm data/ki.sqlite +rm storage/ki.sqlite ``` ``` diff --git a/migrations/versions/459520b01f34_.py b/migrations/versions/459520b01f34_.py index b510dea..23fabc6 100644 --- a/migrations/versions/459520b01f34_.py +++ b/migrations/versions/459520b01f34_.py @@ -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 ###