Why is my Cloud SQL external replica not reflecting schema changes (like new columns) after Django migrations?
I'm using Google Cloud Database Migration Service (DMS) to replicate data from a self-managed PostgreSQL database into a Cloud SQL for PostgreSQL instance, configured as an external primary replica.
The migration job is running in CDC mode (Change Data Capture), using continuous replication. Everything seems fine for data: new rows and updates are being replicated successfully.
However, after running Django’s makemigrations
and migrate
on the source database — which added new columns and renamed others — the schema changes are not reflected in the Cloud SQL replica. The new columns simply don’t exist in the destination.
🔍 What I’ve done:
- Source: self-managed PostgreSQL instance.
- Target: Cloud SQL for PostgreSQL set as an external replica.
- Replication user has proper privileges and is connected via mTLS.
- The job is active, with "Optimal" parallelism and healthy status.
- Data replication (INSERT/UPDATE/DELETE) works great.
- Schema changes like
ALTER TABLE
,ADD COLUMN
,RENAME COLUMN
are not reflected in the replica.
❓ Question:
How can I configure DMS or Cloud SQL to also replicate schema changes (like ALTER TABLE or CREATE COLUMN) from the source to the replica? Or is it necessary to manually apply schema changes on the target?
I'm fine with workarounds or official recommendations — just need clarity on the correct approach for schema evolution in this setup.