feat: Improve preparation method display and filtering
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user