Skip to main content

Automated schema migrations

·1 min

When a schema change is made in a data contract you might want to think about how you can automate the deployment of that and migration to it, without data loss or effort from the consumers.

For non-breaking schema changes, for example adding a new optional field, that’s certainly achievable, and having that automated would allow data producers to make that change with autonomy whenever they need to.

But what about breaking schema changes?

The size of a breaking schema change varies, and could be removing a single previously required column to a large scale change of the data structure.

Because of that variety, I don’t believe they can be automated.

But I’ve found this to be a feature, rather than a limitation.

Because of the effort involved, I’ve found data producers spend more time considering the schema at the design phase, with their consumers, to try to limit the need for a breaking change.

And then when a breaking change is required, it forces the data producers to talk to their consumers about the migration, which again increases the communication between those two groups.

It’s a great example of how friction encourages the behaviours we want to see.

Not everything can be automated. Sometimes that’s a feature.


Want great, practical advice on implementing data mesh, data products and data contracts?

In my weekly newsletter I share with you an original post and links to what's new and cool in the world of data mesh, data products, and data contracts.

I also include a little pun, because why not? 😅

(Don’t worry—I hate spam, too, and I’ll NEVER share your email address with anyone!)


Andrew Jones
Author
Andrew Jones
I build data platforms that reduce risk and drive revenue.