Erste Produktivversion
This commit is contained in:
31
backend/alembic/versions/0003_must_change_password.py
Normal file
31
backend/alembic/versions/0003_must_change_password.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""Phase 2b: Zwang zum Passwortwechsel beim initial angelegten Admin
|
||||
|
||||
Revision ID: 0003
|
||||
Revises: 0002
|
||||
Create Date: 2026-08-07
|
||||
"""
|
||||
from collections.abc import Sequence
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0003"
|
||||
down_revision: str | None = "0002"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"user",
|
||||
sa.Column(
|
||||
"must_change_password",
|
||||
sa.Boolean(),
|
||||
nullable=False,
|
||||
server_default=sa.text("0"),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("user", "must_change_password")
|
||||
Reference in New Issue
Block a user