mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-19 15:54:27 +02:00
Add missing migration for spoolbuddy update_status columns
The OTA update feature added update_status and update_message to the SpoolBuddyDevice model but no ALTER TABLE migration, causing "no such column: spoolbuddy_devices.update_status" on existing databases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3d0cdbb504
commit
3a09108457
@@ -1396,6 +1396,16 @@ async def run_migrations(conn):
|
||||
except OperationalError:
|
||||
pass # Already applied
|
||||
|
||||
# Migration: Add OTA update tracking columns to spoolbuddy_devices
|
||||
try:
|
||||
await conn.execute(text("ALTER TABLE spoolbuddy_devices ADD COLUMN update_status VARCHAR(20)"))
|
||||
except OperationalError:
|
||||
pass # Already applied
|
||||
try:
|
||||
await conn.execute(text("ALTER TABLE spoolbuddy_devices ADD COLUMN update_message VARCHAR(255)"))
|
||||
except OperationalError:
|
||||
pass # Already applied
|
||||
|
||||
# Migration: Convert ams_labels table from (printer_id, ams_id) key to ams_serial_number key
|
||||
# Labels are now keyed by AMS serial number so they persist when the AMS is moved to another printer.
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user