Actualiser api/database.php
CI / PHP Syntax Check (push) Has been cancelled
CI / JavaScript Lint (push) Has been cancelled
CI / Docker Build Test (push) Has been cancelled
CI / Validate Translation Files (push) Has been cancelled
Security Scan (Trivy) / Trivy — Docker image scan (push) Has been cancelled
Security Scan (Trivy) / Trivy — Filesystem scan (push) Has been cancelled
CI / Auto-merge develop → main (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled

This commit is contained in:
2026-06-27 16:49:56 +00:00
parent 22dd77c879
commit 18169417d3
+8
View File
@@ -489,6 +489,14 @@ if (empty($recipeTagsTables)) {
sort_order INTEGER DEFAULT 0
);
");
}
// Migration: add keywords column to recipe_tags if missing
$rtCols = array_column($db->query("PRAGMA table_info(recipe_tags)")->fetchAll(), 'name');
if (!in_array('keywords', $rtCols)) {
try { $db->exec("ALTER TABLE recipe_tags ADD COLUMN keywords TEXT DEFAULT ''"); }
catch (PDOException $e) { if (strpos($e->getMessage(), 'duplicate column') === false) throw $e; }
}
$db->exec("INSERT INTO recipe_tags (key, label, icon, sort_order) VALUES
('cocktail', 'Cocktail', '🍹', 1),
('sans_alcool', 'Sans alcool', '🚫', 2),