0

So we have three development environments from a programming point of view. Each environment has its own postgres database.

Let's say a table gets an extra column in our development environment, we need to update the acceptance environment as well when the code is merged back. Other changes can be column renames etc.

This is needed because we are still developing the app quite heavily, but it is still important that the production environment can keep up on a database level as well.

So the question is: how can I propagate schema updates to a different database without loss of data.

0

I suggest that you use a tool such as Liquibase or Flyway which is designed to manage such schema changes in a database and keep the configurations consistent and known.

http://www.liquibase.org/

https://flywaydb.org/

There are other tools available and they usually have plugins to maven, Puppet & Chef etc...it'll come down to a google search and personal preference.

1
  • I second that. We have started using Liquibase many years ago Jun 17 '16 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.