generated from dopt-python/py311
update DB schema
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
"""updated timestamps nullability
|
||||
|
||||
Revision ID: c285b0606094
|
||||
Revises: 2afa4e506448
|
||||
Create Date: 2026-07-10 09:22:12.340425
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "c285b0606094"
|
||||
down_revision: Union[str, Sequence[str], None] = "2afa4e506448"
|
||||
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("beratung_einzelberatung") as batch_op:
|
||||
batch_op.alter_column(
|
||||
"aktualisiert",
|
||||
existing_type=sa.DATETIME(),
|
||||
nullable=False,
|
||||
)
|
||||
|
||||
with op.batch_alter_table("beratung_vorgang") as batch_op:
|
||||
batch_op.alter_column("aktualisiert", existing_type=sa.DATETIME(), nullable=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("beratung_einzelberatung") as batch_op:
|
||||
batch_op.alter_column(
|
||||
"aktualisiert",
|
||||
existing_type=sa.DATETIME(),
|
||||
nullable=True,
|
||||
)
|
||||
|
||||
with op.batch_alter_table("beratung_vorgang") as batch_op:
|
||||
batch_op.alter_column("aktualisiert", existing_type=sa.DATETIME(), nullable=True)
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user