Organization migration: Improve data integrity
## Executive Summary Integrate external efforts in order to improve data integrity of an organization migration. #### Engineering Assessment 1. Add to organization migration playbook/script: Re-run (on the Protocell) all batched background migrations since last required stop, after one or more org moves. 1. Add to organization migration playbook/script: Freeze an organization's data even from background tasks 1. Example: Stop scheduling Sidekiq jobs by org or sharding key and drain enqueued jobs (this will take quite some work) 1. Depends on: Organization attribution per Sidekiq job (or at least the most impactful ones) 2. Depends on: A Prometheus metric (or aggregate) which tracks the number of enqueued jobs per organization 1. Example: Use Postgres Row-level security to freeze the org (this may not be feasible/easy) 1. Depends on: Postgres expert to build this ability
epic