diff --git a/backend/src/db.js b/backend/src/db.js index 740ec55..e2ee1f3 100644 --- a/backend/src/db.js +++ b/backend/src/db.js @@ -101,6 +101,7 @@ if (!ordCols.includes('bezahlt_am')) db.exec("ALTER TABLE orders ADD COLUMN beza // Migrationen order_items const oiCols = db.prepare("PRAGMA table_info(order_items)").all().map(r => r.name); +if (!oiCols.includes('stunden')) db.exec("ALTER TABLE order_items ADD COLUMN stunden REAL NOT NULL DEFAULT 0"); if (!oiCols.includes('custom_price')) db.exec("ALTER TABLE order_items ADD COLUMN custom_price REAL"); if (!oiCols.includes('status')) db.exec("ALTER TABLE order_items ADD COLUMN status TEXT NOT NULL DEFAULT 'warteliste'"); if (!oiCols.includes('qty_warteliste')) db.exec("ALTER TABLE order_items ADD COLUMN qty_warteliste INTEGER NOT NULL DEFAULT 0");