feat: Improve preparation method display and filtering

This commit is contained in:
2026-06-07 00:31:38 +05:30
parent 012db524cb
commit 681f892d63
8 changed files with 452 additions and 63 deletions

View File

@@ -50,9 +50,15 @@ const initDb = async () => {
rating INTEGER,
created_at BIGINT,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
is_deleted BOOLEAN DEFAULT FALSE
is_deleted BOOLEAN DEFAULT FALSE,
recipe_data JSONB DEFAULT '{}'
)
`);
// Ensure the recipe_data column exists on older db setups
await pool.query(`
ALTER TABLE brew_logs ADD COLUMN IF NOT EXISTS recipe_data JSONB DEFAULT '{}'
`);
console.log('Database initialized');
} catch (err) {
console.error('Error initializing database', err);