From 638b83d26bdee04789485626f714c696527acc03 Mon Sep 17 00:00:00 2001 From: Dicken Date: Tue, 26 May 2026 00:55:53 +0200 Subject: [PATCH] Dateien nach "backend/src" hochladen --- backend/src/db.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/db.js b/backend/src/db.js index bbc3c0c..740ec55 100644 --- a/backend/src/db.js +++ b/backend/src/db.js @@ -94,6 +94,11 @@ const cols = db.prepare("PRAGMA table_info(calculations)").all().map(r => r.name if (!cols.includes('image')) db.exec("ALTER TABLE calculations ADD COLUMN image TEXT"); if (!cols.includes('bemerkung')) db.exec("ALTER TABLE calculations ADD COLUMN bemerkung TEXT NOT NULL DEFAULT ''"); +// Migrationen orders +const ordCols = db.prepare("PRAGMA table_info(orders)").all().map(r => r.name); +if (!ordCols.includes('bezahlt')) db.exec("ALTER TABLE orders ADD COLUMN bezahlt INTEGER NOT NULL DEFAULT 0"); +if (!ordCols.includes('bezahlt_am')) db.exec("ALTER TABLE orders ADD COLUMN bezahlt_am DATETIME"); + // Migrationen order_items const oiCols = db.prepare("PRAGMA table_info(order_items)").all().map(r => r.name); if (!oiCols.includes('custom_price')) db.exec("ALTER TABLE order_items ADD COLUMN custom_price REAL");