revert: restore production to the state before 730d0bd (PM/RBAC work moved to 'pm')
Their three commits (730d0bd,5a9b543,387edfb) reached production by push and auto-deployed.387edfbexpects a users.username column that the live database does not have, so POST /api/v1/auth/login was returning HTTP 500. Their schema changes never applied either (projects still has only id, name, description, start_date, pm_user_id, created_at), so nothing depends on the reverted code. This commit sets the tree back to exactlya02b3ea— verified with git diff against it — while keeping history linear: the work itself is preserved on 'pm' at387edfb.
This commit is contained in:
@@ -44,19 +44,14 @@ class SupplierMaterialCreate(APIModel):
|
||||
|
||||
class ProjectCreate(APIModel):
|
||||
name: str = Field(min_length=1)
|
||||
location: str | None = None
|
||||
project_manager: str | None = None
|
||||
description: str | None = None
|
||||
start_date: date | None = None
|
||||
|
||||
|
||||
class ProjectUpdate(APIModel):
|
||||
name: str | None = Field(default=None, min_length=1)
|
||||
location: str | None = None
|
||||
project_manager: str | None = None
|
||||
description: str | None = None
|
||||
start_date: date | None = None
|
||||
status: str | None = None
|
||||
# PM assignment (1:N — one PM per project, a PM may own many projects).
|
||||
# Admin / procurement manager only; None unassigns this project's PM.
|
||||
pm_user_id: UUID | None = None
|
||||
@@ -208,13 +203,13 @@ class UserCreate(APIModel):
|
||||
last_name: str = ""
|
||||
phone: str | None = None
|
||||
casdoor_id: str | None = None
|
||||
role: Literal["pm", "procurement_manager", "admin", "supervisor"] | None = None
|
||||
role: Literal["pm", "procurement_manager", "admin"] | None = None
|
||||
|
||||
|
||||
class UserRoleUpdate(APIModel):
|
||||
"""role=None revokes the role (and any project assignment)."""
|
||||
|
||||
role: Literal["pm", "procurement_manager", "admin", "supervisor"] | None = None
|
||||
role: Literal["pm", "procurement_manager", "admin"] | None = None
|
||||
|
||||
|
||||
class UserProjectUpdate(APIModel):
|
||||
|
||||
Reference in New Issue
Block a user