-- reference data (groups, promo codes, regions, allowed domains)
insert into groups (name, sort_order) values
  ('Social Media Campaigns',1),
  ('KEVO Instagram Campaign',2),
  ('Simon Marjoram Campaign',3),
  ('Karma Cares Campaign',4),
  ('KG Brand Ambassadors',5),
  ('Reciprocal Partner Clubs (RPM)',6),
  ('KG Member Referrals',7),
  ('Retail Guests',8),
  ('No Promo Code',9),
  ('Unassigned',10)
on conflict (name) do nothing;

insert into promo_codes (code, display_name, main_group) values
  ('SOCIALKARMA','SOCIALKARMA','Social Media Campaigns'),
  ('HOK','HOK Trial Member','Social Media Campaigns'),
  ('KEVO','KEVO','KEVO Instagram Campaign'),
  ('KEVO75','Dormant Campaign - KEVO (75)','Simon Marjoram Campaign'),
  ('KEVO25','Toured Not Bought - KEVO (25)','Simon Marjoram Campaign'),
  ('WELCOME','WELCOME','Simon Marjoram Campaign'),
  ('BRIGHTON','BRIGHTON','Simon Marjoram Campaign'),
  ('SISTERHOOD','SISTERHOOD','Karma Cares Campaign'),
  ('LEROSEY','LEROSEY','Karma Cares Campaign'),
  ('GOODKARMA','LEGENDS OF RUGBY / GOOD KARMA','Karma Cares Campaign'),
  ('CHANDLER','CHANDLER','KG Brand Ambassadors'),
  ('WALSH','WALSH','KG Brand Ambassadors'),
  ('CROFTY','CROFTY','KG Brand Ambassadors'),
  ('MIKE','MIKE','KG Brand Ambassadors'),
  ('REDMAN','REDMAN','KG Brand Ambassadors'),
  ('ROBSHAW','ROBSHAW','KG Brand Ambassadors'),
  ('OLLIE','OLLIE','KG Brand Ambassadors'),
  ('SASKIA','SASKIA','KG Brand Ambassadors'),
  ('MADELEY','MADELEY','KG Brand Ambassadors'),
  ('HOOPER','HOOPER','KG Brand Ambassadors'),
  ('BLAIR','BLAIR','KG Brand Ambassadors'),
  ('PHIL','PHIL','KG Brand Ambassadors'),
  ('DANNY','DANNY','KG Brand Ambassadors'),
  ('UBOGU','UBOGU','KG Brand Ambassadors'),
  ('WOMENWHOSKI','WOMENWHOSKI','KG Brand Ambassadors'),
  ('RPM-ALLEPPEYUNITED','ALLEPPEYUNITED','Reciprocal Partner Clubs (RPM)'),
  ('RPM-ALLSTARR','ALLSTARR','Reciprocal Partner Clubs (RPM)'),
  ('RPM-AMBIKA','AMBIKA','Reciprocal Partner Clubs (RPM)'),
  ('RPM-APARNA17','APARNA17','Reciprocal Partner Clubs (RPM)'),
  ('RPM-AQUARIA','AQUARIA','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CALICUTCOSMO','CALICUTCOSMO','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CAPITALCLUB','CAPITALCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CHARHOLI','CHARHOLI','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CHESTERHILL','CHESTERHILL','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CINDRELLA','CINDRELLA','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CIRCLECLUB','CIRCLECLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CITICLUB','CITICLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CLUBRIVIERA','CLUBRIVIERA','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CONFLUENCE','CONFLUENCE','Reciprocal Partner Clubs (RPM)'),
  ('RPM-CUBCLUB','CUBCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-DUNESCLUB','DUNESCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-GLADSTONE','GLADSTONE','Reciprocal Partner Clubs (RPM)'),
  ('RPM-GOLDFIELDD','GOLDFIELDD','Reciprocal Partner Clubs (RPM)'),
  ('RPM-GUDALURCOSMO','GUDALURCOSMO','Reciprocal Partner Clubs (RPM)'),
  ('RPM-HOMEHOUSE','HOMEHOUSE','Reciprocal Partner Clubs (RPM)'),
  ('RPM-INSIGNIA','INSIGNIA','Reciprocal Partner Clubs (RPM)'),
  ('RPM-KANNUR','KANNUR','Reciprocal Partner Clubs (RPM)'),
  ('RPM-KHCLUB','KHCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-KOTACLUB','KOTACLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-KRISHNAVALLEY','KRISHNAVALLEY','Reciprocal Partner Clubs (RPM)'),
  ('RPM-LAWSONFLATS','LAWSONFLATS','Reciprocal Partner Clubs (RPM)'),
  ('RPM-MERIDIAN','MERIDIAN','Reciprocal Partner Clubs (RPM)'),
  ('RPM-METROCLUB','METROCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-MINDESCAPES','MINDESCAPES','Reciprocal Partner Clubs (RPM)'),
  ('RPM-MOUNTAINCLUB','MOUNTAINCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-NASAB','NASAB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-NO18','NO18','Reciprocal Partner Clubs (RPM)'),
  ('RPM-PARAISO','PARAISO','Reciprocal Partner Clubs (RPM)'),
  ('RPM-PRESTIGENIRVANA','PRESTIGENIRVANA','Reciprocal Partner Clubs (RPM)'),
  ('RPM-PRESTIGEPARK','PRESTIGEPARK','Reciprocal Partner Clubs (RPM)'),
  ('RPM-RAINBOW','RAINBOW','Reciprocal Partner Clubs (RPM)'),
  ('RPM-1880','1880','Reciprocal Partner Clubs (RPM)'),
  ('RPM-SANAD','SANAD','Reciprocal Partner Clubs (RPM)'),
  ('RPM-SPACECIRCLE','SPACECIRCLE','Reciprocal Partner Clubs (RPM)'),
  ('RPM-SPRINGCLUB','SPRINGCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-SQUARECLUB','SQUARECLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-SUNCITY','SUNCITY','Reciprocal Partner Clubs (RPM)'),
  ('RPM-THEGROUND','THEGROUND','Reciprocal Partner Clubs (RPM)'),
  ('RPM-TRANSCEND','TRANSCEND','Reciprocal Partner Clubs (RPM)'),
  ('RPM-TULIPCLUB','TULIPCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-TULIPCLUBHOUSE','TULIPCLUBHOUSE','Reciprocal Partner Clubs (RPM)'),
  ('RPM-VALLEYVIEW','VALLEYVIEW','Reciprocal Partner Clubs (RPM)'),
  ('RPM-WESTINDCOUNTRY','WESTINDCOUNTRY','Reciprocal Partner Clubs (RPM)'),
  ('RPM-WINNERCLUB','WINNERCLUB','Reciprocal Partner Clubs (RPM)'),
  ('RPM-WORLDWIDEVILLA','WORLDWIDEVILLA','Reciprocal Partner Clubs (RPM)'),
  ('MEMBERREFERRAL','Unique Codes - Member Referral Codes','KG Member Referrals'),
  ('KARMABEACHBALI','KARMABEACHBALI','Retail Guests'),
  ('DIMARE','DIMARE','Retail Guests'),
  ('KARMAKANDARASPA','KARMAKANDARASPA','Retail Guests'),
  ('KARMAJIMBARANSPA','KARMAJIMBARANSPA','Retail Guests'),
  ('KTPB','KTPB','Retail Guests'),
  ('KARMABAVARIA','KARMABAVARIA','Retail Guests'),
  ('DARIOS','DARIOS','Retail Guests'),
  ('KARMALEPLATANE','KARMALEPLATANE','Retail Guests'),
  ('KARMASMARTINS','KARMASMARTINS','Retail Guests'),
  ('ENOTECALEOLI','ENOTECALEOLI','Retail Guests'),
  ('LAKESIDE','LAKESIDE','Retail Guests'),
  ('KRISPA','KRISPA','Retail Guests'),
  ('THEBAY','THEBAY','Retail Guests'),
  ('YOSI','YOSI','Retail Guests'),
  ('KARMAKANDARA','KARMAKANDARA','Retail Guests'),
  ('LOSNARANJOS','LOSNARANJOS','Retail Guests'),
  ('AMPHORA','AMPHORA','Retail Guests'),
  ('KARMABORGO','KARMABORGO','Retail Guests'),
  ('KCGM','KCGM','No Promo Code')
on conflict (code) do nothing;

insert into region_map (country, region) values
  ('India','India'),
  ('Australia','SEAP'),
  ('New Zealand','SEAP'),
  ('Indonesia','SEAP'),
  ('Singapore','SEAP'),
  ('Malaysia','SEAP'),
  ('Thailand','SEAP'),
  ('Philippines','SEAP'),
  ('Vietnam','SEAP'),
  ('United Kingdom','EU_UK_ROW'),
  ('UK','EU_UK_ROW'),
  ('Ireland','EU_UK_ROW'),
  ('Spain','EU_UK_ROW'),
  ('France','EU_UK_ROW'),
  ('Germany','EU_UK_ROW'),
  ('Italy','EU_UK_ROW'),
  ('Portugal','EU_UK_ROW'),
  ('United States','EU_UK_ROW'),
  ('USA','EU_UK_ROW'),
  ('Canada','EU_UK_ROW'),
  ('United Arab Emirates','EU_UK_ROW')
on conflict (country) do nothing;

insert into allowed_domains (domain) values
  ('karmagroup.com'),
  ('karmabeach.com')
on conflict (domain) do nothing;
