Make proxmox_storage a global setting instead of a per-job snapshot
CI / Frontend build (push) Successful in 11s
CI / Script syntax (push) Successful in 4s
CI / Backend tests (push) Successful in 18s

Backup jobs stored their own proxmox_storage column, copied from
settings at creation time and never resynced. process_backup preferred
that frozen job value, so changing Settings > Proxmox storage had no
effect on existing jobs. Drop the per-job column and always use the
current global setting when starting a backup.

Also copies AGENTS.md to CLAUDE.md.
This commit is contained in:
Sonnet 5
2026-07-15 12:20:44 +02:00
parent 608f13cb78
commit 1288ba731d
7 changed files with 239 additions and 17 deletions
+3 -5
View File
@@ -51,10 +51,10 @@ def create_job(payload: dict) -> dict:
"""
INSERT INTO backup_jobs(
guest_vmid, guest_name, guest_type, node, enabled, cron_schedule,
proxmox_storage, backup_mode, compression, retention_type, retention_value,
backup_mode, compression, retention_type, retention_value,
next_run_at, created_at, updated_at
)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
""",
(
payload["guest_vmid"],
@@ -63,7 +63,6 @@ def create_job(payload: dict) -> dict:
payload["node"],
int(payload.get("enabled", True)),
payload["cron_schedule"],
payload["proxmox_storage"],
payload["backup_mode"],
payload["compression"],
payload["retention_type"],
@@ -88,7 +87,7 @@ def update_job(job_id: int, payload: dict) -> dict:
"""
UPDATE backup_jobs SET
guest_vmid = ?, guest_name = ?, guest_type = ?, node = ?, enabled = ?,
cron_schedule = ?, proxmox_storage = ?, backup_mode = ?, compression = ?,
cron_schedule = ?, backup_mode = ?, compression = ?,
retention_type = ?, retention_value = ?, next_run_at = ?, updated_at = ?
WHERE id = ?
""",
@@ -99,7 +98,6 @@ def update_job(job_id: int, payload: dict) -> dict:
merged["node"],
int(merged["enabled"]),
merged["cron_schedule"],
merged["proxmox_storage"],
merged["backup_mode"],
merged["compression"],
merged["retention_type"],