generated from dopt-python/py311
49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
"""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 ###
|