fix(host_agent): the maintenance-jobs migration waits for maintenance_windows, and the guards know the new table and action (#5767)
CI 9146 on 22b0be2:
- integration: host_agent_007 ran before core 0010 created maintenance_windows
(its window_id foreign key), so the schema never built. It now
depends_on 0010_maintenance_windows.
- unit: host_maintenance_jobs is named in the backup's EXCLUDED (run
history, like ansible_runs and host_downtime), and the
host_agent.maintenance audit action has its wording.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,8 @@ import sqlalchemy as sa
|
||||
revision: str = "host_agent_007_maint_jobs"
|
||||
down_revision: Union[str, None] = "host_agent_006_maint_helper"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
# maintenance_windows (core 0010) must exist before the window_id key.
|
||||
depends_on: Union[str, Sequence[str], None] = ("0010_maintenance_windows",)
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
|
||||
Reference in New Issue
Block a user