Uploaded image for project: 'Yell'
  1. Yell
  2. YELL-858

Migration script is deleting all city targets associated with target id from campaign target map table

    Details

      Description

      The migration script is deleting all the entries of city targets associated with target id from gce_campaignTargetMap table.

      When we run the migration script for a single seuserid then its deleting all the targets associated with SAID for all the campaigns from gce_campaignTargetMap table.

      Targets are deleting for all associated campaigns when run for a single campaign.

      Following are the steps to reproduce

      1. Get a seuser id and get the targetid associated with that.

      mysql> select * from gce_campaign_location_target_summary where campaignName like '%DDN02_1000000003_733%';
      ---------------------------------------------------------------------------------------------------------------------------------

      searchEngineUserID customerID campaignID campaignSEID campaignName targetID targetType isRemoved removedDate

      ---------------------------------------------------------------------------------------------------------------------------------

      84826 2213355334 1007381 142952441 DDN02_1000000003_733_DDN02-1_GT 1004 city 0 NULL

      ---------------------------------------------------------------------------------------------------------------------------------

      2. Run the migration script.
      EX java -jar location-target-remover-0.0.1-SNAPSHOT.jar -b 1 -s 84826 -h 4 -d 3

      For the above seuser the target id is 1004 following is the count before and after migration.

      Count of gce_campaignTargetMap before migration
      mysql> select count from content_editor_google.gce_campaignTargetMap a,content_editor_google.gce_target b where b.id = a.targetID and a.targetID=1004;
      ----------

      count

      ----------

      31

      ----------

      Count of gce_campaignTargetMap after migration
      mysql> select count from content_editor_google.gce_campaignTargetMap a,content_editor_google.gce_target b where b.id = a.targetID and a.targetID=1004;
      ----------

      count

      ----------

      0

      ----------

        Attachments

          Activity

            People

            • Assignee:
              ajay.nagaraj Ajay Nagaraj (Inactive)
              Reporter:
              anil.kumar Anil Kumar Halmadgi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: