mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
Add missing migrations for printer nozzle_count and print_hours_offset
These columns were added in 0.1.6 beta but migrations were missing: - nozzle_count: Integer DEFAULT 1 (for dual-extruder detection) - print_hours_offset: Float DEFAULT 0.0 (baseline hours adjustment) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
7e88092d61
commit
0a9bca2239
@@ -947,6 +947,18 @@ async def run_migrations(conn):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Migration: Add nozzle_count column to printers (for dual-extruder detection)
|
||||
try:
|
||||
await conn.execute(text("ALTER TABLE printers ADD COLUMN nozzle_count INTEGER DEFAULT 1"))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Migration: Add print_hours_offset column to printers (baseline hours adjustment)
|
||||
try:
|
||||
await conn.execute(text("ALTER TABLE printers ADD COLUMN print_hours_offset REAL DEFAULT 0.0"))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
async def seed_notification_templates():
|
||||
"""Seed default notification templates if they don't exist."""
|
||||
|
||||
Reference in New Issue
Block a user