# PPC Sync Adjustments Deployment ## Deployment ### Sprint Work 19.4.0 | Title | URL | |-------|-----| |PPC: Shift to Synchronous Adjustments|https://jira.mckesson.com:8443/browse/SUPL-473| ## Plan ### Pull Requests * Event Publisher - https://supplylogix.visualstudio.com/Application/_git/EventPublisher/pullrequest/993?_a=overview * PPC - https://supplylogix.visualstudio.com/Application/_git/PinpointCount/pullrequest/994?_a=overview * Nbt - https://supplylogix.visualstudio.com/Application/_git/Nbt/pullrequest/995?_a=overview ### Services to deploy * ~~Event Publisher~~ * ~~Pinpoint Count~~ * ~~Nbt Web~~ * ~~Enable the following chains 4,21,32,33,42,44,48,49,55,59,61,62,64,66,68,70,74,81,82,84, and 86.~~ ### Migration script Run the following script in the `Supplylogix.pinpoint_count` database. This disables synchronous adjustments for all clients. ```sql begin tran; update cs set cs.featuresettingsjson = json_modify(cs.featuresettingsjson, '$.AreAsynchronousAdjustmentsEnabled', cast(1 as bit)) from chainsettings cs inner join chains c on c.id = cs.chainid and c.settingsversion = cs.[version] -- rollback -- commit ``` Then you can run the following to enable it only for Ingles: ```sql begin tran; update cs set cs.featuresettingsjson = json_modify(cs.featuresettingsjson, '$.AreAsynchronousAdjustmentsEnabled', cast(0 as bit)) from chainsettings cs inner join chains c on c.id = cs.chainid and c.settingsversion = cs.[version] where c.id in (33) -- rollback -- commit ``` Verify that things look good and then either `rollback` if not or `commit` if so. ### Steps 1. ~~Run the first migration.~~ 2. ~~Merge all the PRs~~ 4. ~~Deploy the Event Publisher~~ 5. ~~Deploy PPC~~ 6. ~~Deploy Prod Nbt Web~~ 7. ~~Verify PPC still works with async adjustments.~~ 8. ~~Run the second migration.~~ ## Rollback Plan ### Steps 1. Revert to previous release. 2. Find problem and fix it. ###### tags: `ppc` `event-publisher`