updateweb
This commit is contained in:
19
backend/migrations/create-site-settings.sql
Normal file
19
backend/migrations/create-site-settings.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- 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;
|
||||
Reference in New Issue
Block a user