The symptom: consent records point to a processor that no longer processes anything
Why migrations leave this behind
rsync flag updates processor references. No Terraform module touches your consent ledger. The data moves, but the metadata describing who handles the data stays frozen at the moment consent was collected.
Three specific things tend to go stale:
- Processor identity — the legal entity name and registration of the cloud provider acting as your data processor.
- DPA reference — the agreement ID or version that governed the old processing relationship. Your new provider has a different DPA (or you have not signed one yet, which is worse).
- Data location — if the new provider stores data in a different jurisdiction, the consent record may reference a country or region that no longer applies. UU PDP Article 56 imposes requirements on cross-border transfers, so a wrong location reference is not trivial.
Tracing the gap: a practical audit
SQL
SELECT user_id, consent_purpose, processor_name, dpa_reference, data_location, consent_timestamp
FROM consent_records
ORDER BY consent_timestamp DESC
LIMIT 100;processor_name and data_location columns. If they reference your old provider, you have confirmed the symptom.
Step 2: Document your current processing chain.
Write down, in plain text, who actually processes personal data right now. This includes your new cloud provider, any managed database services, CDN providers, email delivery services, and analytics platforms. Each one that touches personal data is a processor under UU PDP.
Step 3: Compare.
Any processor in Step 2 that does not appear in Step 1 is an undocumented processor. Any processor in Step 1 that is not in Step 2 is a ghost reference. Both are problems.
Red herrings to skip
- "We updated our privacy policy page." Good, but the privacy policy is a disclosure document. It is not the consent record itself. Updating the website text does not retroactively fix the processor reference stored in each individual consent entry.
- "The old provider deleted our data." That addresses data retention on the old side, but it does not fix the fact that your consent records still name them as the active processor.
- "We have a new DPA with the new provider." Necessary, but not sufficient. The DPA exists as a legal document. Your consent records need to reference it. If they still point to the old DPA (or no DPA at all), the chain is broken. For more on what a DPA needs to contain under UU PDP, see How to Check If Your Data Processing Agreement Actually Meets UU PDP Requirements.
The root cause: no migration step for consent metadata
Fixing the mapping
UPDATE in place.
The exact implementation depends on your schema, but conceptually:
SQL
-- Illustrative example: inserting a superseding consent record
INSERT INTO consent_records (
user_id,
consent_purpose,
processor_name,
dpa_reference,
data_location,
consent_timestamp,
supersedes_record_id,
change_reason
) SELECT
user_id,
consent_purpose,
'New Provider Legal Entity Name',
'DPA-2025-NEWPROVIDER-001',
'ID', -- or the actual jurisdiction code
NOW(),
id,
'Processor changed due to infrastructure migration'
FROM consent_records
WHERE processor_name = 'Old Provider Legal Entity Name'
AND supersedes_record_id IS NULL;Important: If the change in processor is material — for example, data now moves to a different country — UU PDP may require you to re-obtain consent rather than simply updating the record. This is a legal determination, not a technical one. Consult with whoever handles your data protection compliance before deciding whether a record update is sufficient or whether users need to be notified and asked to consent again.Preventing future drift Add a consent metadata check to your migration runbook. This does not need to be complex. A post-migration verification script that queries your consent table and flags records where the processor name does not match your current provider list is enough:
BASH
# Sample check: find consent records referencing a processor not in the current list
# Adjust the query for your database and schema
mysql -u readonly_user -p -e "
SELECT COUNT(*) AS stale_records
FROM consent_records
WHERE processor_name NOT IN ('Current Provider A', 'Current Provider B')
AND supersedes_record_id IS NULL;
" your_database_nameVerification: confirming the fix
- No orphaned processor references remain. Run the stale-records query above. Result should be zero.
- Every active processor has a valid DPA. Cross-reference the
dpa_referencefield against your actual signed agreements. A reference to a DPA that does not exist is as bad as a reference to the wrong one. - Data location matches reality. If your consent records say data is stored in Indonesia but your new provider runs workloads in Singapore, that is a discrepancy that has regulatory implications under UU PDP Article 56's cross-border transfer provisions.
