From 68bd873838faf4f95095547bc0211f06aad6c490 Mon Sep 17 00:00:00 2001 From: foefl Date: Fri, 31 Jul 2026 15:31:59 +0200 Subject: [PATCH] fix db schema --- ...ocuments_of_initial_recording_fix_typo_.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 alembic/versions/8704e976f0ba_documents_of_initial_recording_fix_typo_.py diff --git a/alembic/versions/8704e976f0ba_documents_of_initial_recording_fix_typo_.py b/alembic/versions/8704e976f0ba_documents_of_initial_recording_fix_typo_.py new file mode 100644 index 0000000..0f00c49 --- /dev/null +++ b/alembic/versions/8704e976f0ba_documents_of_initial_recording_fix_typo_.py @@ -0,0 +1,38 @@ +"""documents of initial recording - fix typo in column + +Revision ID: 8704e976f0ba +Revises: f74114e74ad9 +Create Date: 2026-07-31 11:44:08.601177 + +""" + +from typing import Sequence, Union + +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision: str = "8704e976f0ba" +down_revision: Union[str, Sequence[str], None] = "f74114e74ad9" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + """Upgrade schema.""" + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table("Grunderfassung_Dokumente", schema=None) as batch_op: + batch_op.add_column(sa.Column("speicher_pfad", sa.Text(), nullable=False)) + batch_op.drop_column("speicherpfad") + + # ### end Alembic commands ### + + +def downgrade() -> None: + """Downgrade schema.""" + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table("Grunderfassung_Dokumente", schema=None) as batch_op: + batch_op.add_column(sa.Column("speicherpfad", sa.TEXT(), nullable=False)) + batch_op.drop_column("speicher_pfad") + + # ### end Alembic commands ###