Switch app icons to Lucide names, update existing rows on conflict

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-01 18:09:55 +00:00
parent cd21697af3
commit a0edbec92b

View file

@ -41,13 +41,13 @@ export async function initDb() {
await pool.query(`
INSERT INTO apps (slug, name, description, base_path, icon, theme_color)
VALUES
('noticeboard', 'Noticeboard', 'Staff notices and announcements', '/notices', '📋', '#1e3a5f'),
('kitchen', 'Kitchen Flash', 'Invoice processing and GP tracking', '/kitchen', '🍳', '#e85d04'),
('cashup', 'Cash Up', 'Hotel daily cashing up', '/cashup', '💷', '#6b2d8b'),
('housekeeping','Housekeeping', 'Room status and task management', '/hk', '🛏️', '#2d6a4f'),
('forecasting', 'Forecasting', 'Revenue forecasting and reporting', '/forecast', '📈', '#0077b6'),
('rates', 'Rate Scraper', 'Competitor rate monitoring', '/rates', '🔍', '#7b4f00')
ON CONFLICT (slug) DO NOTHING
('noticeboard', 'Noticeboard', 'Staff notices and announcements', '/notices', 'ClipboardList', '#1e3a5f'),
('kitchen', 'Kitchen Flash','Invoice processing and GP tracking', '/kitchen', 'ChefHat', '#e85d04'),
('cashup', 'Cash Up', 'Hotel daily cashing up', '/cashup', 'Banknote', '#6b2d8b'),
('housekeeping','Housekeeping', 'Room status and task management', '/hk', 'BedDouble', '#2d6a4f'),
('forecasting', 'Forecasting', 'Revenue forecasting and reporting', '/forecast','TrendingUp', '#0077b6'),
('rates', 'Rate Scraper', 'Competitor rate monitoring', '/rates', 'Tag', '#7b4f00')
ON CONFLICT (slug) DO UPDATE SET icon = EXCLUDED.icon
`)
// Seed first admin user if table is empty