cadence icon indicating copy to clipboard operation
cadence copied to clipboard

Automatic Schema upgrade support for production docker

Open samarabbas opened this issue 6 years ago • 2 comments

Current recommendation for using Cadence docker is to not enable automatic schema upgrade. Schema upgrades are always applied out of band to underlying database before rolling out Cadence upgrade to the cluster. This issue is to allow schema upgrades to cluster as part of regular Cadence upgrade automatically. All schemas are versioned and schema upgrade could be applied to database when service comes up. We do need to address race condition to make sure schema upgrades are safe if performed from multiple hosts.

samarabbas avatar Oct 20 '19 22:10 samarabbas

Ideally we want to ensure atomicity of an update as well as the update script can fail in the middle of its execution.

mfateev avatar Oct 20 '19 22:10 mfateev

This tool may be useful https://github.com/golang-migrate/migrate.

mingfang avatar Oct 20 '19 22:10 mingfang