-- Carboany Seed Data: Campaigns & Missions -- Run: supabase db reset (applies migrations + this seed) -- Or: psql $DATABASE_URL -f supabase/seed.sql -- ============================================================ -- 1. Campaigns -- ============================================================ insert into public.campaigns (id, title, description, region, start_date, end_date, target_co2_kg, status) values ('47e3d9aa-8bc0-423c-9d5d-4e9a093eb5eb', '제주 텀블러 챌린지 2026', '제주도 내 카페에서 텀블러/다회용컵 사용을 인증하는 캠페인', '제주특별자치도', '2026-04-01', null, 500, 'active'), ('a3a60fa0-b0e8-4489-a7c2-e6ec50ab34a0', '한라산 클린하이킹', '한라산 등반 시 쓰레기 수거 활동 인증', '제주특별자치도', '2026-04-01', '2026-12-31', 200, 'active'), ('e0bd1d22-7109-4411-9e4a-e2ba51457c77', '제주 에코카페 인증제', '제주 지역 에코 인증 카페 방문 및 텀블러 할인 영수증 인증', '제주특별자치도', '2026-04-01', null, 300, 'active'), ('58433f63-e3db-4af4-80e2-28ddba1f04a4', '서귀포 자전거 출퇴근', '서귀포시 자전거 출퇴근 GPS 인증 캠페인', '서귀포시', '2026-04-01', '2026-09-30', 150, 'active') on conflict (id) do update set title = excluded.title, description = excluded.description, region = excluded.region, start_date = excluded.start_date, end_date = excluded.end_date, target_co2_kg = excluded.target_co2_kg, status = excluded.status; -- ============================================================ -- 2. Missions (names disambiguated by proof method) -- ============================================================ -- Key fix: "다회용컵 사용 인증" + "텀블러 사용 인증" were both receipt-type -- in the same campaign, making them look like duplicates. -- Now: one is photo-based, one is receipt-based, names are distinct. insert into public.missions (id, campaign_id, title, description, proof_type, verification_method, co2_per_action_grams, daily_limit_per_user, sort_order, status) values -- 제주 텀블러 챌린지 2026 ('86cb414a-45c0-498c-bd99-8b64946c3bd2', '47e3d9aa-8bc0-423c-9d5d-4e9a093eb5eb', '다회용컵 사진 인증', '텀블러/다회용컵 사용 장면을 사진으로 촬영하여 인증합니다', 'photo', 'ai_photo', 21, 3, 1, 'active'), ('a7d4f3cf-c79e-4abf-a475-50fda743c6c2', '47e3d9aa-8bc0-423c-9d5d-4e9a093eb5eb', '텀블러 할인 영수증 인증', '카페에서 텀블러 할인이 적용된 영수증을 촬영하여 인증합니다', 'receipt', 'ocr', 21, 3, 2, 'active'), -- 한라산 클린하이킹 ('e024c69e-2cc8-488f-a92a-f2534d320c6c', 'a3a60fa0-b0e8-4489-a7c2-e6ec50ab34a0', '쓰레기 수거 인증', '등산 중 수거한 쓰레기 사진을 촬영하여 인증합니다', 'photo', 'ai_photo', 35, 2, 1, 'active'), ('ad4a6d46-a5ce-4cd2-9862-bfcd0cbd20ff', 'a3a60fa0-b0e8-4489-a7c2-e6ec50ab34a0', '한라산 정상 인증', '한라산 정상에서 GPS 위치를 인증합니다', 'gps', 'gps_fence', 50, 1, 2, 'active'), -- 제주 에코카페 인증제 ('6ff092ab-1ced-4a21-b4b5-17671fc1dbb3', 'e0bd1d22-7109-4411-9e4a-e2ba51457c77', '에코카페 방문 인증', '에코 인증 카페 방문 시 GPS 위치를 인증합니다', 'gps', 'gps_fence', 15, 2, 1, 'active'), ('60dfb3a7-0606-4ced-bf21-8dd720f19a5f', 'e0bd1d22-7109-4411-9e4a-e2ba51457c77', '에코카페 영수증 인증', '에코카페에서 텀블러 할인이 적용된 영수증을 촬영합니다', 'receipt', 'ocr', 21, 3, 2, 'active'), -- 서귀포 자전거 출퇴근 ('d599576b-5252-4dae-8abf-f6de071d7464', '58433f63-e3db-4af4-80e2-28ddba1f04a4', '자전거 출근 GPS 인증', '자전거 출근 경로를 GPS로 기록합니다', 'gps', 'gps_fence', 45, 1, 1, 'active'), ('ae22531e-3a34-45e0-9494-71ea751bf818', '58433f63-e3db-4af4-80e2-28ddba1f04a4', '자전거 퇴근 GPS 인증', '자전거 퇴근 경로를 GPS로 기록합니다', 'gps', 'gps_fence', 45, 1, 2, 'active') on conflict (id) do update set title = excluded.title, description = excluded.description, proof_type = excluded.proof_type, verification_method = excluded.verification_method, co2_per_action_grams = excluded.co2_per_action_grams, daily_limit_per_user = excluded.daily_limit_per_user, sort_order = excluded.sort_order;