SHARE
TWEET

Untitled

a guest Dec 9th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DO $$
  2.   BEGIN
  3.     ALTER TABLE IF EXISTS experience_extranet_content.ticket_customer_group_mapping ADD COLUMN quantifier INT DEFAULT 1 NOT NULL;
  4.     EXCEPTION
  5.       WHEN duplicate_column THEN RAISE NOTICE 'column quantifier already exists';
  6.   END;
  7. $$;
  8.  
  9. DO $$
  10.   BEGIN
  11.     ALTER TABLE IF EXISTS experience_extranet_content.ticket_customer_group_predefined ADD COLUMN quantifier INT DEFAULT 1 NOT NULL;
  12.     EXCEPTION
  13.       WHEN duplicate_column THEN RAISE NOTICE 'column quantifier already exists';
  14.   END;
  15. $$;
  16.  
  17.  
  18. CREATE OR REPLACE FUNCTION experience_extranet_content_v2_api.insert_customer_group(customer_group jsonb) returns boolean
  19.     security definer
  20.     language plpgsql
  21. as $$
  22. DECLARE
  23.   group_unit_id     TEXT;
  24.   group_id          TEXT;
  25.   rate_type_object TEXT;
  26.   rate_type_array  TEXT[];
  27.   group_name       TEXT;
  28. BEGIN
  29.   group_unit_id := REPLACE(UPPER(customer_group->>'customer_group_unit'), ' ', '_');
  30.   group_id := REPLACE(UPPER(customer_group->>'customer_group_name'), ' ', '_');
  31.  
  32.   INSERT INTO experience_extranet_content.ticket_customer_group_unit (
  33.     group_unit_id,
  34.     group_unit
  35.   )
  36.   VALUES (
  37.     group_unit_id,
  38.     customer_group->>'customer_group_unit'
  39.   )
  40.   ON CONFLICT DO NOTHING;
  41.   INSERT INTO experience_extranet_content.ticket_customer_group_predefined (
  42.     group_id,
  43.     group_unit_id,
  44.     group_name,
  45.     group_description,
  46.     quantifier
  47.   )
  48.   VALUES (
  49.     group_id,
  50.     group_unit_id,
  51.     customer_group->>'customer_group_name',
  52.     customer_group->>'description',
  53.     (COALESCE(customer_group->>'quantifier', '1')) :: INTEGER
  54.   )
  55.   ON CONFLICT DO NOTHING;
  56.   rate_type_array := ARRAY ['CONTRACT','PUBLISH','PARITY','RECOMMENDED'];
  57. FOREACH rate_type_object in ARRAY rate_type_array
  58.   LOOP
  59.     group_name := REPLACE(customer_group->>'customer_group_name', ' ', '_');
  60.     INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (
  61.       group_id,
  62.       rate_type
  63.     )
  64.     VALUES (
  65.       group_id,
  66.       UPPER(group_name) || '_' || rate_type_object
  67.     )
  68.     ON CONFLICT DO NOTHING;
  69.   END LOOP;
  70.   RETURN FOUND;
  71. END;
  72. $$;
  73.  
  74. CREATE OR REPLACE FUNCTION experience_extranet_content_v2_helper.get_customer_group_list_by_ticket_id(ticket_id_filter text, group_unit_id_filter text) returns jsonb
  75.     security definer
  76.     language sql
  77. as $$
  78.   SELECT to_jsonb(array_agg(result))
  79.   FROM (
  80.     SELECT  group_id,
  81.             group_unit_id,
  82.             group_name,
  83.             group_description,
  84.             maximum_size,
  85.             minimum_size,
  86.             quantifier,
  87.             experience_extranet_content_v2_helper.get_rate_type_by_group_id(m.group_id) as "rate_type_list"
  88.     FROM    experience_extranet_content.ticket_customer_group_mapping m
  89.     WHERE   m.ticket_id = ticket_id_filter AND m.group_unit_id = group_unit_id_filter
  90.   ) AS result
  91. $$;
  92.  
  93. INSERT INTO experience_extranet_content.experience_type (experience_type_id, experience_type_name, experience_category)
  94. VALUES ('REGULAR', 'Regular', 'UMRAH')
  95. ON CONFLICT (experience_type_id) DO UPDATE SET experience_type_name = EXCLUDED.experience_type_name, experience_category = EXCLUDED.experience_category;
  96. INSERT INTO experience_extranet_content.experience_type (experience_type_id, experience_type_name, experience_category)
  97. VALUES ('PLUS', 'Plus', 'UMRAH')
  98. ON CONFLICT (experience_type_id) DO UPDATE SET experience_type_name = EXCLUDED.experience_type_name, experience_category = EXCLUDED.experience_category;
  99. INSERT INTO experience_extranet_content.experience_type (experience_type_id, experience_type_name, experience_category)
  100. VALUES ('RAMADHAN', 'Ramadhan', 'UMRAH')
  101. ON CONFLICT (experience_type_id) DO UPDATE SET experience_type_name = EXCLUDED.experience_type_name, experience_category = EXCLUDED.experience_category;
  102. INSERT INTO experience_extranet_content.experience_type (experience_type_id, experience_type_name, experience_category)
  103. VALUES ('OTHERS', 'Others', 'LEISURE')
  104. ON CONFLICT (experience_type_id) DO UPDATE SET experience_type_name = EXCLUDED.experience_type_name, experience_category = EXCLUDED.experience_category;
  105.  
  106.  
  107. INSERT INTO experience_extranet_content.ticket_customer_group_unit (group_unit_id, group_unit) VALUES ('UMRAH', 'UMRAH') ON CONFLICT (group_unit_id) DO UPDATE SET group_unit = EXCLUDED.group_unit;
  108. INSERT INTO experience_extranet_content.ticket_customer_group_unit (group_unit_id, group_unit) VALUES ('PACKAGE_SINGLE', 'PACKAGE_SINGLE') ON CONFLICT (group_unit_id) DO UPDATE SET group_unit = EXCLUDED.group_unit;
  109. INSERT INTO experience_extranet_content.ticket_customer_group_unit (group_unit_id, group_unit) VALUES ('PACKAGE_DOUBLE', 'PACKAGE_DOUBLE') ON CONFLICT (group_unit_id) DO UPDATE SET group_unit = EXCLUDED.group_unit;
  110. INSERT INTO experience_extranet_content.ticket_customer_group_unit (group_unit_id, group_unit) VALUES ('PACKAGE_TRIPLE', 'PACKAGE_TRIPLE') ON CONFLICT (group_unit_id) DO UPDATE SET group_unit = EXCLUDED.group_unit;
  111. INSERT INTO experience_extranet_content.ticket_customer_group_unit (group_unit_id, group_unit) VALUES ('PACKAGE_QUAD', 'PACKAGE_QUAD') ON CONFLICT (group_unit_id) DO UPDATE SET group_unit = EXCLUDED.group_unit;
  112.  
  113. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('UMRAH_SINGLE_SHARING', 'UMRAH', 'SINGLE_SHARING', 'Group for Single Sharing') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  114. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('UMRAH_SINGLE', 'UMRAH', 'SINGLE', 'Group for Single') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  115. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('UMRAH_DOUBLE', 'UMRAH', 'DOUBLE', 'Group for Double') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  116. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('UMRAH_TRIPLE', 'UMRAH', 'TRIPLE', 'Group for Triple') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  117. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('UMRAH_QUAD', 'UMRAH', 'QUAD', 'Group for Quad') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  118. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('PACKAGE_SINGLE_ADULT', 'PACKAGE_SINGLE', 'ADULT', 'Group for Package Single Adult') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  119. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('PACKAGE_DOUBLE_ADULT', 'PACKAGE_DOUBLE', 'ADULT', 'Group for Package Double Adult') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  120. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('PACKAGE_DOUBLE_CHILD', 'PACKAGE_DOUBLE', 'CHILD', 'Group for Package Double Child') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  121. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('PACKAGE_TRIPLE_ADULT', 'PACKAGE_TRIPLE', 'ADULT', 'Group for Package Adult') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  122. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('PACKAGE_TRIPLE_CHILD', 'PACKAGE_TRIPLE', 'CHILD', 'Group for Package Child') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  123. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('PACKAGE_QUAD_ADULT', 'PACKAGE_QUAD', 'ADULT', 'Group for Package Quad Adult') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  124. INSERT INTO experience_extranet_content.ticket_customer_group_predefined (group_id, group_unit_id, group_name, group_description) VALUES ('PACKAGE_QUAD_CHILD', 'PACKAGE_QUAD', 'CHILD', 'Group for Package Quad Child') ON CONFLICT (group_id, group_unit_id) DO UPDATE SET group_name = EXCLUDED.group_name, group_description = EXCLUDED.group_description;
  125.  
  126.  
  127.  
  128. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_SINGLE_SHARING', 'UMRAH_SINGLE_SHARING_CONTRACT') ON CONFLICT DO NOTHING;
  129. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_SINGLE_SHARING', 'UMRAH_SINGLE_SHARING_PUBLISH') ON CONFLICT DO NOTHING;
  130. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_SINGLE_SHARING', 'UMRAH_SINGLE_SHARING_PARITY') ON CONFLICT DO NOTHING;
  131. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_SINGLE_SHARING', 'UMRAH_SINGLE_SHARING_RECOMMENDED') ON CONFLICT DO NOTHING;
  132. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_SINGLE', 'UMRAH_SINGLE_CONTRACT') ON CONFLICT DO NOTHING;
  133. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_SINGLE', 'UMRAH_SINGLE_PUBLISH') ON CONFLICT DO NOTHING;
  134. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_SINGLE', 'UMRAH_SINGLE_PARITY') ON CONFLICT DO NOTHING;
  135. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_SINGLE', 'UMRAH_SINGLE_RECOMMENDED') ON CONFLICT DO NOTHING;
  136. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_DOUBLE', 'UMRAH_DOUBLE_CONTRACT') ON CONFLICT DO NOTHING;
  137. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_DOUBLE', 'UMRAH_DOUBLE_PUBLISH') ON CONFLICT DO NOTHING;
  138. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_DOUBLE', 'UMRAH_DOUBLE_PARITY') ON CONFLICT DO NOTHING;
  139. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_DOUBLE', 'UMRAH_DOUBLE_RECOMMENDED') ON CONFLICT DO NOTHING;
  140. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_TRIPLE', 'UMRAH_TRIPLE_CONTRACT') ON CONFLICT DO NOTHING;
  141. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_TRIPLE', 'UMRAH_TRIPLE_PUBLISH') ON CONFLICT DO NOTHING;
  142. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_TRIPLE', 'UMRAH_TRIPLE_PARITY') ON CONFLICT DO NOTHING;
  143. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_TRIPLE', 'UMRAH_TRIPLE_RECOMMENDED') ON CONFLICT DO NOTHING;
  144. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_QUAD', 'UMRAH_QUAD_CONTRACT') ON CONFLICT DO NOTHING;
  145. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_QUAD', 'UMRAH_QUAD_PUBLISH') ON CONFLICT DO NOTHING;
  146. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_QUAD', 'UMRAH_QUAD_PARITY') ON CONFLICT DO NOTHING;
  147. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('UMRAH_QUAD', 'UMRAH_QUAD_RECOMMENDED') ON CONFLICT DO NOTHING;
  148. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_SINGLE_ADULT', 'PACKAGE_SINGLE_ADULT_CONTRACT') ON CONFLICT DO NOTHING;
  149. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_SINGLE_ADULT', 'PACKAGE_SINGLE_ADULT_PUBLISH') ON CONFLICT DO NOTHING;
  150. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_SINGLE_ADULT', 'PACKAGE_SINGLE_ADULT_PARITY') ON CONFLICT DO NOTHING;
  151. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_SINGLE_ADULT', 'PACKAGE_SINGLE_ADULT_RECOMMENDED') ON CONFLICT DO NOTHING;
  152. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_DOUBLE_ADULT', 'PACKAGE_DOUBLE_ADULT_CONTRACT') ON CONFLICT DO NOTHING;
  153. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_DOUBLE_ADULT', 'PACKAGE_DOUBLE_ADULT_PUBLISH') ON CONFLICT DO NOTHING;
  154. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_DOUBLE_ADULT', 'PACKAGE_DOUBLE_ADULT_PARITY') ON CONFLICT DO NOTHING;
  155. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_DOUBLE_ADULT', 'PACKAGE_DOUBLE_ADULT_RECOMMENDED') ON CONFLICT DO NOTHING;
  156. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_DOUBLE_CHILD', 'PACKAGE_DOUBLE_CHILD_CONTRACT') ON CONFLICT DO NOTHING;
  157. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_DOUBLE_CHILD', 'PACKAGE_DOUBLE_CHILD_PUBLISH') ON CONFLICT DO NOTHING;
  158. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_DOUBLE_CHILD', 'PACKAGE_DOUBLE_CHILD_PARITY') ON CONFLICT DO NOTHING;
  159. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_DOUBLE_CHILD', 'PACKAGE_DOUBLE_CHILD_RECOMMENDED') ON CONFLICT DO NOTHING;
  160. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_TRIPLE_ADULT', 'PACKAGE_TRIPLE_ADULT_CONTRACT') ON CONFLICT DO NOTHING;
  161. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_TRIPLE_ADULT', 'PACKAGE_TRIPLE_ADULT_PUBLISH') ON CONFLICT DO NOTHING;
  162. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_TRIPLE_ADULT', 'PACKAGE_TRIPLE_ADULT_PARITY') ON CONFLICT DO NOTHING;
  163. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_TRIPLE_ADULT', 'PACKAGE_TRIPLE_ADULT_RECOMMENDED') ON CONFLICT DO NOTHING;
  164. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_TRIPLE_CHILD', 'PACKAGE_TRIPLE_CHILD_CONTRACT') ON CONFLICT DO NOTHING;
  165. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_TRIPLE_CHILD', 'PACKAGE_TRIPLE_CHILD_PUBLISH') ON CONFLICT DO NOTHING;
  166. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_TRIPLE_CHILD', 'PACKAGE_TRIPLE_CHILD_PARITY') ON CONFLICT DO NOTHING;
  167. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_TRIPLE_CHILD', 'PACKAGE_TRIPLE_CHILD_RECOMMENDED') ON CONFLICT DO NOTHING;
  168. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_QUAD_ADULT', 'PACKAGE_QUAD_ADULT_CONTRACT') ON CONFLICT DO NOTHING;
  169. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_QUAD_ADULT', 'PACKAGE_QUAD_ADULT_PUBLISH') ON CONFLICT DO NOTHING;
  170. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_QUAD_ADULT', 'PACKAGE_QUAD_ADULT_PARITY') ON CONFLICT DO NOTHING;
  171. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_QUAD_ADULT', 'PACKAGE_QUAD_ADULT_RECOMMENDED') ON CONFLICT DO NOTHING;
  172. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_QUAD_CHILD', 'PACKAGE_QUAD_CHILD_CONTRACT') ON CONFLICT DO NOTHING;
  173. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_QUAD_CHILD', 'PACKAGE_QUAD_CHILD_PUBLISH') ON CONFLICT DO NOTHING;
  174. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_QUAD_CHILD', 'PACKAGE_QUAD_CHILD_PARITY') ON CONFLICT DO NOTHING;
  175. INSERT INTO experience_extranet_content.ticket_customer_group_rate_type (group_id, rate_type) VALUES ('PACKAGE_QUAD_CHILD', 'PACKAGE_QUAD_CHILD_RECOMMENDED') ON CONFLICT DO NOTHING;
  176.  
  177. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 2 WHERE group_id = 'PACKAGE_DOUBLE_ADULT' AND group_unit_id = 'PACKAGE_DOUBLE';
  178. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 4 WHERE group_id = 'PACKAGE_QUAD_CHILD' AND group_unit_id = 'PACKAGE_QUAD';
  179. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 4 WHERE group_id = 'PACKAGE_QUAD_ADULT' AND group_unit_id = 'PACKAGE_QUAD';
  180. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 2 WHERE group_id = 'UMRAH_DOUBLE' AND group_unit_id = 'UMRAH';
  181. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 4 WHERE group_id = 'UMRAH_QUAD' AND group_unit_id = 'UMRAH';
  182. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 3 WHERE group_id = 'UMRAH_TRIPLE' AND group_unit_id = 'UMRAH';
  183. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 2 WHERE group_id = 'PACKAGE_DOUBLE_CHILD' AND group_unit_id = 'PACKAGE_DOUBLE';
  184. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 3 WHERE group_id = 'PACKAGE_TRIPLE_CHILD' AND group_unit_id = 'PACKAGE_TRIPLE';
  185. UPDATE experience_extranet_content.ticket_customer_group_predefined SET quantifier = 3 WHERE group_id = 'PACKAGE_TRIPLE_ADULT' AND group_unit_id = 'PACKAGE_TRIPLE';
  186.  
  187. INSERT INTO experience_extranet_experience.experience_category_type_mapping (experience_category, experience_type)
  188. VALUES ('UMRAH', 'REGULAR')
  189. ON CONFLICT (experience_type) DO UPDATE SET experience_category = EXCLUDED.experience_category;
  190. INSERT INTO experience_extranet_experience.experience_category_type_mapping (experience_category, experience_type)
  191. VALUES ('UMRAH', 'PLUS')
  192. ON CONFLICT (experience_type) DO UPDATE SET experience_category = EXCLUDED.experience_category;
  193. INSERT INTO experience_extranet_experience.experience_category_type_mapping (experience_category, experience_type)
  194. VALUES ('UMRAH', 'RAMADHAN')
  195. ON CONFLICT (experience_type) DO UPDATE SET experience_category = EXCLUDED.experience_category;
  196. INSERT INTO experience_extranet_experience.experience_category_type_mapping (experience_category, experience_type)
  197. VALUES ('LEISURE', 'OTHERS')
  198. ON CONFLICT (experience_type) DO UPDATE SET experience_category = EXCLUDED.experience_category;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top