-- Migration: Refresh travel-plan dialog content for the Sep 2025 Entrainment run
-- Description: Updates the showDialogMessage cards for the travelPlanDependOnward /
--              travelPlanDependReturn questions — new event dates (Thu 04 Sep 2025 onward /
--              Sun 07 Sep 2025 return) and a "view on maps" contentLink added to the city
--              pick-up/drop (Ratnadeep) and own-transport (Leonia) cards. Flight cards get
--              text updates only, no map link. Follows the same binding_key-based approach
--              as other migrations in this repo (e.g.
--              2026-08-12-01-master-question-and-remaining-templates-label-overrides-update.sql)
--              rather than hardcoding question ids.
--
-- Three layers updated, same shape as that migration:
--   1) master_question — the shared catalog every new program template clones from, no
--      program_type restriction (every program type carrying this binding_key gets it).
--   2) template_question — every program type's template rows for this binding_key (no
--      program_type restriction, per explicit instruction), so any future clone already
--      starts correct.
--   3) hdb_question — backfill already-created Entrainment programs' own cloned rows
--      (scoped to PT_ENTRAINMENT via hdb_program_question -> program_v1 -> program_type_v1,
--      same join pattern as 2026-08-18-04-add-size-chart-info-dialog-to-tshirt-size.sql),
--      so registrants on programs that already exist see the new dates/links too.
--
-- Replaces the whole showDialogMessage array (jsonb_set on that one key) in each case —
-- every other config key (dependsOn, isRequired, showDialog, isAdvancedValidation) is left
-- untouched. Also fixes a pre-existing typo on the return "city drop" card
-- (dialogContentType -> dialogueContentType), since that key is being replaced anyway.

-- =====================================================
-- 1) master_question
-- =====================================================

UPDATE master_question mq
SET config = jsonb_set(
      mq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city pick up",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "City Pick-up Time: Buses will depart at 5:00 p.m. from Ratnadeep, East Marredpally, Secunderabad, on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-in Time: From 4:00 p.m. to 9:00 p.m. on Thursday, 04 September 2025, at Leonia.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Airport Pick-up Time: Buses will be available at Hyderabad airport from 3:00 p.m. to 7:00 p.m. on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
WHERE mq.binding_key = 'travelPlanDependOnward'
  AND mq.deleted_at IS NULL;

UPDATE master_question mq
SET config = jsonb_set(
      mq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city drop",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.\nCity Drop Time: Buses will depart from Leonia on Sunday, 07 September 2025, starting 11:45 a.m. onwards in regular intervals to Ratnadeep, East Marredpally, Secunderabad.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Buses will depart from Leonia starting 11:45 a.m. onwards in regular intervals to Hyderabad airport.\nCheck-out time from Leonia - latest by 2:00 p.m. on Sunday, 07 September 2025.\nWe recommend outstation participants to plan their return journey post 4:00 p.m. to have enough time to reach the airport.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
WHERE mq.binding_key = 'travelPlanDependReturn'
  AND mq.deleted_at IS NULL;

-- =====================================================
-- 2) template_question — every program type carrying this binding_key
-- =====================================================

UPDATE template_question tq
SET config = jsonb_set(
      tq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city pick up",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "City Pick-up Time: Buses will depart at 5:00 p.m. from Ratnadeep, East Marredpally, Secunderabad, on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-in Time: From 4:00 p.m. to 9:00 p.m. on Thursday, 04 September 2025, at Leonia.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Airport Pick-up Time: Buses will be available at Hyderabad airport from 3:00 p.m. to 7:00 p.m. on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
WHERE tq.binding_key = 'travelPlanDependOnward'
  AND tq.deleted_at IS NULL;

UPDATE template_question tq
SET config = jsonb_set(
      tq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city drop",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.\nCity Drop Time: Buses will depart from Leonia on Sunday, 07 September 2025, starting 11:45 a.m. onwards in regular intervals to Ratnadeep, East Marredpally, Secunderabad.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Buses will depart from Leonia starting 11:45 a.m. onwards in regular intervals to Hyderabad airport.\nCheck-out time from Leonia - latest by 2:00 p.m. on Sunday, 07 September 2025.\nWe recommend outstation participants to plan their return journey post 4:00 p.m. to have enough time to reach the airport.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
WHERE tq.binding_key = 'travelPlanDependReturn'
  AND tq.deleted_at IS NULL;

-- =====================================================
-- 3) hdb_question — backfill all already-created PT_ENTRAINMENT programs
-- =====================================================

UPDATE hdb_question hq
SET config = jsonb_set(
      hq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city pick up",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "City Pick-up Time: Buses will depart at 5:00 p.m. from Ratnadeep, East Marredpally, Secunderabad, on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-in Time: From 4:00 p.m. to 9:00 p.m. on Thursday, 04 September 2025, at Leonia.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Airport Pick-up Time: Buses will be available at Hyderabad airport from 3:00 p.m. to 7:00 p.m. on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
FROM hdb_program_question pq
JOIN program_v1 p         ON p.id = pq.program_id
JOIN program_type_v1 pty  ON pty.id = p.program_type_id
WHERE pq.question_id = hq.id
  AND hq.binding_key = 'travelPlanDependOnward'
  AND pty.key         = 'PT_ENTRAINMENT'
  AND hq.deleted_at  IS NULL
  AND pq.deleted_at  IS NULL
  AND p.deleted_at   IS NULL;

UPDATE hdb_question hq
SET config = jsonb_set(
      hq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city drop",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.\nCity Drop Time: Buses will depart from Leonia on Sunday, 07 September 2025, starting 11:45 a.m. onwards in regular intervals to Ratnadeep, East Marredpally, Secunderabad.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Buses will depart from Leonia starting 11:45 a.m. onwards in regular intervals to Hyderabad airport.\nCheck-out time from Leonia - latest by 2:00 p.m. on Sunday, 07 September 2025.\nWe recommend outstation participants to plan their return journey post 4:00 p.m. to have enough time to reach the airport.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
FROM hdb_program_question pq
JOIN program_v1 p         ON p.id = pq.program_id
JOIN program_type_v1 pty  ON pty.id = p.program_type_id
WHERE pq.question_id = hq.id
  AND hq.binding_key = 'travelPlanDependReturn'
  AND pty.key         = 'PT_ENTRAINMENT'
  AND hq.deleted_at  IS NULL
  AND pq.deleted_at  IS NULL
  AND p.deleted_at   IS NULL;

-- =====================================================
-- 4) master_question — plain (non-Depend) travelPlanOnward / travelPlanReturn
-- These belong to program types other than PT_ENTRAINMENT (ENT excludes them per
-- 03template-refresh.sql). hdb_question is intentionally NOT backfilled for these two
-- keys — it's unclear which program type's live registrant-facing rows this Sep 2025
-- Entrainment content should overwrite, so only the shared template defaults are updated.
-- =====================================================

UPDATE master_question mq
SET config = jsonb_set(
      mq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city pick up",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "City Pick-up Time: Buses will depart at 5:00 p.m. from Ratnadeep, East Marredpally, Secunderabad, on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-in Time: From 4:00 p.m. to 9:00 p.m. on Thursday, 04 September 2025, at Leonia.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Airport Pick-up Time: Buses will be available at Hyderabad airport from 3:00 p.m. to 7:00 p.m. on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
WHERE mq.binding_key = 'travelPlanOnward'
  AND mq.deleted_at IS NULL;

UPDATE master_question mq
SET config = jsonb_set(
      mq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city drop",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.\nCity Drop Time: Buses will depart from Leonia on Sunday, 07 September 2025, starting 11:45 a.m. onwards in regular intervals to Ratnadeep, East Marredpally, Secunderabad.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Buses will depart from Leonia starting 11:45 a.m. onwards in regular intervals to Hyderabad airport.\nCheck-out time from Leonia - latest by 2:00 p.m. on Sunday, 07 September 2025.\nWe recommend outstation participants to plan their return journey post 4:00 p.m. to have enough time to reach the airport.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
WHERE mq.binding_key = 'travelPlanReturn'
  AND mq.deleted_at IS NULL;

-- =====================================================
-- 5) template_question — plain (non-Depend) travelPlanOnward / travelPlanReturn
-- =====================================================

UPDATE template_question tq
SET config = jsonb_set(
      tq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city pick up",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "City Pick-up Time: Buses will depart at 5:00 p.m. from Ratnadeep, East Marredpally, Secunderabad, on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-in Time: From 4:00 p.m. to 9:00 p.m. on Thursday, 04 September 2025, at Leonia.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Airport Pick-up Time: Buses will be available at Hyderabad airport from 3:00 p.m. to 7:00 p.m. on Thursday, 04 September 2025.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
WHERE tq.binding_key = 'travelPlanOnward'
  AND tq.deleted_at IS NULL;

UPDATE template_question tq
SET config = jsonb_set(
      tq.config,
      '{showDialogMessage}',
      '[
        {
          "type": "card",
          "isShow": "city drop",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.\nCity Drop Time: Buses will depart from Leonia on Sunday, 07 September 2025, starting 11:45 a.m. onwards in regular intervals to Ratnadeep, East Marredpally, Secunderabad.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Plot+No.+25%2FB,+B+10-3-150,+St+Johns+Rd,+Teachers+Colony,+East+Marredpally,+Secunderabad,+Telangana+500026/@17.4433645,78.4248542,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb9b972bfdba3d:0x276b387188e2c0e1!2m2!1d78.507256!2d17.4433814?entry=ttu"
          }
        },
        {
          "type": "card",
          "isShow": "own transport",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Check-out Time: Latest by 2:00 p.m. on Sunday, 07 September 2025.",
          "dialogueContentType": "dynamic",
          "contentLink": {
            "linkText": "view on maps",
            "url": "https://www.google.com/maps/dir//Leonia+Holistic+Destination,+Bommaraspet,+Shamirpet,+Hyderabad,+Telangana+500078/@17.577536,78.5192748,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x3bcb83a8b772b329:0x2e2a182505121b00!2m2!1d78.6016766!2d17.5775531?entry=ttu&g_ep=EgoyMDI2MDgxMi4wIKXMDSoASAFQAw%3D%3D"
          }
        },
        {
          "type": "card",
          "isShow": "flight",
          "imageName": null,
          "contentType": "text",
          "dialogueContent": "Buses will depart from Leonia starting 11:45 a.m. onwards in regular intervals to Hyderabad airport.\nCheck-out time from Leonia - latest by 2:00 p.m. on Sunday, 07 September 2025.\nWe recommend outstation participants to plan their return journey post 4:00 p.m. to have enough time to reach the airport.",
          "dialogueContentType": "dynamic"
        }
      ]'::jsonb
    ),
    updated_at = NOW(),
    updated_by = -2
WHERE tq.binding_key = 'travelPlanReturn'
  AND tq.deleted_at IS NULL;
