webupdate1
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
-- Add structured fields to pages table for contact information
|
||||
-- This allows each section to be edited independently without breaking layout
|
||||
|
||||
ALTER TABLE pages
|
||||
ADD COLUMN IF NOT EXISTS pagedata JSONB DEFAULT '{}'::jsonb;
|
||||
-- This is valid PostgreSQL syntax (JSONB type and IF NOT EXISTS are PostgreSQL features)
|
||||
ALTER TABLE pages ADD COLUMN IF NOT EXISTS pagedata JSONB DEFAULT '{}'::jsonb;
|
||||
|
||||
COMMENT ON COLUMN pages.pagedata IS 'Structured data for pages that need separate editable fields (e.g., contact info)';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
-- Add foreign key constraint for product_images -> products
|
||||
-- This ensures referential integrity and enables CASCADE deletes
|
||||
DO $$
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1 FROM information_schema.table_constraints
|
||||
|
||||
Reference in New Issue
Block a user