Files
SkyArtShop/backend/migrations/create-site-settings.sql
Local Server 017c6376fc updateweb
2025-12-24 00:13:23 -06:00

20 lines
864 B
SQL

-- Create site_settings table for menu and other site configurations
CREATE TABLE IF NOT EXISTS site_settings (
key TEXT PRIMARY KEY,
settings JSONB NOT NULL,
createdat TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updatedat TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Insert default menu items
INSERT INTO site_settings (key, settings)
VALUES ('menu', '{"items":[
{"label":"Home","url":"/home.html","icon":"bi-house","visible":true},
{"label":"Shop","url":"/shop.html","icon":"bi-shop","visible":true},
{"label":"Portfolio","url":"/portfolio.html","icon":"bi-images","visible":true},
{"label":"About","url":"/about.html","icon":"bi-info-circle","visible":true},
{"label":"Blog","url":"/blog.html","icon":"bi-journal-text","visible":true},
{"label":"Contact","url":"/contact.html","icon":"bi-envelope","visible":true}
]}')
ON CONFLICT (key) DO NOTHING;