Files
celtic-life-science/alembic/versions/i9e5a1b7d4f6_remove_general_manager_approval.py
Shubhankar45 8fdd20b29f Production
2026-09-22 06:23:46 +00:00

29 lines
816 B
Python

"""remove the General Manager approval stage
The Area Manager is the final approver: PENDING_AM -> APPROVED | RETURNED. Any report
still sitting in the retired PENDING_GM status goes back to the Area Manager's queue.
Historical audit rows (including FORWARD) are left untouched.
Revision ID: i9e5a1b7d4f6
Revises: h8d4f0a6c3e5
Create Date: 2026-09-21
"""
from collections.abc import Sequence
from alembic import op
revision: str = "i9e5a1b7d4f6"
down_revision: str | None = "h8d4f0a6c3e5"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
op.execute("UPDATE daily_call_report SET status = 'PENDING_AM' WHERE status = 'PENDING_GM'")
def downgrade() -> None:
# Nothing to restore: the GM stage no longer exists in the code.
pass