13 lines
581 B
PL/PgSQL
13 lines
581 B
PL/PgSQL
-- Development data. Apply with:
|
|
-- psql "$DATABASE_URL" -f db/seed.sql
|
|
BEGIN;
|
|
|
|
INSERT INTO public.items (id, "name", "description") VALUES
|
|
(1, '{"fr": "Premier objet", "en": "First item"}', '{"fr": "Un objet de démonstration.", "en": "A demo item."}'),
|
|
(2, '{"fr": "Deuxième objet", "en": "Second item"}', '{"fr": "Un autre objet de démonstration.", "en": "Another demo item."}')
|
|
ON CONFLICT DO NOTHING;
|
|
|
|
-- Keep the sequence in sync with the explicit ids inserted above
|
|
SELECT setval('public.items_id_seq', (SELECT COALESCE(MAX(id), 1) FROM public.items));
|
|
|
|
COMMIT;
|