init
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
INSERT INTO gifts (
|
||||
id,
|
||||
slug,
|
||||
recipient_name,
|
||||
sender_name,
|
||||
title,
|
||||
intro_message,
|
||||
reveal_message,
|
||||
status
|
||||
)
|
||||
VALUES (
|
||||
'11111111-1111-4111-8111-111111111111',
|
||||
'demo',
|
||||
'Anna',
|
||||
'Alex',
|
||||
'A little surprise for you',
|
||||
'I made something for you.',
|
||||
'You make ordinary days feel like something worth remembering. Here is to all the little adventures still ahead.',
|
||||
'published'
|
||||
)
|
||||
ON CONFLICT (slug) DO UPDATE SET
|
||||
recipient_name = excluded.recipient_name,
|
||||
sender_name = excluded.sender_name,
|
||||
title = excluded.title,
|
||||
intro_message = excluded.intro_message,
|
||||
reveal_message = excluded.reveal_message,
|
||||
status = excluded.status,
|
||||
updated_at = CURRENT_TIMESTAMP;
|
||||
|
||||
INSERT INTO gift_items (id, gift_id, type, title, text, media_url, sort_order, metadata)
|
||||
SELECT
|
||||
'22222222-2222-4222-8222-222222222222',
|
||||
id,
|
||||
'image',
|
||||
'The good kind of ordinary.',
|
||||
'The tiny moments are usually the ones that stay with us the longest.',
|
||||
'https://images.unsplash.com/photo-1511988617509-8e73b0f3b7d2?auto=format&fit=crop&w=1400&q=85',
|
||||
1,
|
||||
'{"caption":"A little snapshot of a very good day.","accent":"coral"}'
|
||||
FROM gifts
|
||||
WHERE slug = 'demo'
|
||||
ON CONFLICT (id) DO UPDATE SET
|
||||
gift_id = excluded.gift_id,
|
||||
type = excluded.type,
|
||||
title = excluded.title,
|
||||
text = excluded.text,
|
||||
media_url = excluded.media_url,
|
||||
sort_order = excluded.sort_order,
|
||||
metadata = excluded.metadata;
|
||||
|
||||
INSERT INTO gift_items (id, gift_id, type, title, text, media_url, sort_order, metadata)
|
||||
SELECT
|
||||
'33333333-3333-4333-8333-333333333333',
|
||||
id,
|
||||
'text',
|
||||
'A note for your next chapter.',
|
||||
'Keep choosing the places, people, and tiny rituals that make you feel most like yourself. I will always be cheering for you.',
|
||||
NULL,
|
||||
2,
|
||||
'{"eyebrow":"A note from me","accent":"lavender"}'
|
||||
FROM gifts
|
||||
WHERE slug = 'demo'
|
||||
ON CONFLICT (id) DO UPDATE SET
|
||||
gift_id = excluded.gift_id,
|
||||
type = excluded.type,
|
||||
title = excluded.title,
|
||||
text = excluded.text,
|
||||
media_url = excluded.media_url,
|
||||
sort_order = excluded.sort_order,
|
||||
metadata = excluded.metadata;
|
||||
|
||||
INSERT INTO gift_items (id, gift_id, type, title, text, media_url, sort_order, metadata)
|
||||
SELECT
|
||||
'44444444-4444-4444-8444-444444444444',
|
||||
id,
|
||||
'text',
|
||||
'One more thing.',
|
||||
'There is nowhere else I would rather be than somewhere in the middle of the next story with you.',
|
||||
NULL,
|
||||
3,
|
||||
'{"eyebrow":"P.S.","accent":"gold"}'
|
||||
FROM gifts
|
||||
WHERE slug = 'demo'
|
||||
ON CONFLICT (id) DO UPDATE SET
|
||||
gift_id = excluded.gift_id,
|
||||
type = excluded.type,
|
||||
title = excluded.title,
|
||||
text = excluded.text,
|
||||
media_url = excluded.media_url,
|
||||
sort_order = excluded.sort_order,
|
||||
metadata = excluded.metadata;
|
||||
Reference in New Issue
Block a user