Procházet zdrojové kódy

Fix missing sliced_for_model migration - for real this time (Issue #211)

PR #215 claimed to fix this but the actual ALTER TABLE migration was
not included. Users upgrading from 0.1.6b11 to 0.1.6 still see:
"no such column: print_archives.sliced_for_model"

This commit adds the actual migration that was missing.

Closes #211
maziggy před 7 měsíci
rodič
revize
901ee42cfa
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 6 0
      backend/app/core/database.py

+ 6 - 0
backend/app/core/database.py

@@ -709,6 +709,12 @@ async def run_migrations(conn):
     except Exception:
     except Exception:
         pass
         pass
 
 
+    # Migration: Add sliced_for_model column to print_archives for model-based queue assignment
+    try:
+        await conn.execute(text("ALTER TABLE print_archives ADD COLUMN sliced_for_model VARCHAR(50)"))
+    except Exception:
+        pass
+
     # Migration: Add is_external column to library_files for external cloud files
     # Migration: Add is_external column to library_files for external cloud files
     try:
     try:
         await conn.execute(text("ALTER TABLE library_files ADD COLUMN is_external BOOLEAN DEFAULT 0"))
         await conn.execute(text("ALTER TABLE library_files ADD COLUMN is_external BOOLEAN DEFAULT 0"))