|
@@ -1396,6 +1396,16 @@ async def run_migrations(conn):
|
|
|
except OperationalError:
|
|
except OperationalError:
|
|
|
pass # Already applied
|
|
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
|
|
# 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.
|
|
# Labels are now keyed by AMS serial number so they persist when the AMS is moved to another printer.
|
|
|
try:
|
|
try:
|