-- Idempotent seed: default home page layout (mobile + desktop).
-- Fixes: migration 0008 INSERTs were in the same Drizzle chunk as CREATE INDEX
-- and were silently skipped by the Neon-HTTP single-statement limit.
INSERT INTO page_layouts (id, page, version, body, note)
VALUES (
  '00000000-0000-4000-8000-0000000000aa',
  'home',
  1,
  '{"mobile":[{"instanceId":"00000000-0000-4000-8000-000000000001","type":"deal-row:for-you","config":{"title":{"he":"בשבילך","en":"For You"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000002","type":"deal-row:near-you","config":{"title":{"he":"לידך","en":"Near You"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000003","type":"deal-row:hot-deals","config":{"title":{"he":"עסקאות חמות","en":"Hot Deals"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000004","type":"deal-row:group-deals","config":{"title":{"he":"עסקאות קבוצתיות","en":"Group Deals"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000005","type":"deal-row:whats-left","config":{"title":{"he":"מה שנשאר","en":"What''s Left"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000010","type":"deal-row:category","config":{"title":{"he":"ארוחה","en":"Meal"},"categoryId":"00000000-0000-4000-8000-000000000010","categorySlug":"","categoryName":{"he":"ארוחה","en":"Meal"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000011","type":"deal-row:category","config":{"title":{"he":"מאפייה","en":"Bakery"},"categoryId":"00000000-0000-4000-8000-000000000011","categorySlug":"","categoryName":{"he":"מאפייה","en":"Bakery"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000012","type":"deal-row:category","config":{"title":{"he":"שתייה","en":"Beverage"},"categoryId":"00000000-0000-4000-8000-000000000012","categorySlug":"","categoryName":{"he":"שתייה","en":"Beverage"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000013","type":"deal-row:category","config":{"title":{"he":"קינוח","en":"Dessert"},"categoryId":"00000000-0000-4000-8000-000000000013","categorySlug":"","categoryName":{"he":"קינוח","en":"Dessert"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000014","type":"deal-row:category","config":{"title":{"he":"ארוז","en":"Packaged"},"categoryId":"00000000-0000-4000-8000-000000000014","categorySlug":"","categoryName":{"he":"ארוז","en":"Packaged"},"limit":10},"visibility":{"guests":true,"loggedIn":true}}],"desktop":[{"instanceId":"00000000-0000-4000-8000-000000000001","type":"deal-row:for-you","config":{"title":{"he":"בשבילך","en":"For You"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000002","type":"deal-row:near-you","config":{"title":{"he":"לידך","en":"Near You"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000003","type":"deal-row:hot-deals","config":{"title":{"he":"עסקאות חמות","en":"Hot Deals"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000004","type":"deal-row:group-deals","config":{"title":{"he":"עסקאות קבוצתיות","en":"Group Deals"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000005","type":"deal-row:whats-left","config":{"title":{"he":"מה שנשאר","en":"What''s Left"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000010","type":"deal-row:category","config":{"title":{"he":"ארוחה","en":"Meal"},"categoryId":"00000000-0000-4000-8000-000000000010","categorySlug":"","categoryName":{"he":"ארוחה","en":"Meal"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000011","type":"deal-row:category","config":{"title":{"he":"מאפייה","en":"Bakery"},"categoryId":"00000000-0000-4000-8000-000000000011","categorySlug":"","categoryName":{"he":"מאפייה","en":"Bakery"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000012","type":"deal-row:category","config":{"title":{"he":"שתייה","en":"Beverage"},"categoryId":"00000000-0000-4000-8000-000000000012","categorySlug":"","categoryName":{"he":"שתייה","en":"Beverage"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000013","type":"deal-row:category","config":{"title":{"he":"קינוח","en":"Dessert"},"categoryId":"00000000-0000-4000-8000-000000000013","categorySlug":"","categoryName":{"he":"קינוח","en":"Dessert"},"limit":10},"visibility":{"guests":true,"loggedIn":true}},{"instanceId":"00000000-0000-4000-8000-000000000014","type":"deal-row:category","config":{"title":{"he":"ארוז","en":"Packaged"},"categoryId":"00000000-0000-4000-8000-000000000014","categorySlug":"","categoryName":{"he":"ארוז","en":"Packaged"},"limit":10},"visibility":{"guests":true,"loggedIn":true}}]}'::jsonb,
  'Seed: default home layout'
)
ON CONFLICT (id) DO UPDATE SET body = EXCLUDED.body, note = EXCLUDED.note;
--> statement-breakpoint
INSERT INTO page_layout_pointers (page, live_version_id)
VALUES ('home', '00000000-0000-4000-8000-0000000000aa')
ON CONFLICT (page) DO NOTHING;
