5

My team currently has several beta customers using our product. The current method of upgrading a customer's database to the latest version consists of, re-initializing the database, and re-creating the customers configuration by hand, which isn't a lot, but is certainly tedious and will change as we implement some kind of migration strategy.

My question is, is it possible to use flyway (or some other tool) to manage database schema migrations of all instances of our product, yet retain independent instance data? What is the best approach to this kind of problem.

1 Answer 1

4

Yes, you can use Flyway for this.

You can place the customer-specific reference data in a separate location per customer.

You can then configure flyway.locations like this:

Customer A: flyway.locations=scripts/ddl,scripts/data/customer_a

Customer B: flyway.locations=scripts/ddl,scripts/data/customer_b

Sign up to request clarification or add additional context in comments.

2 Comments

One more related question. Will we only have to unload/load the instance data once for the initialization of flyway? Then I assume subsequent schema migrations should preserve the data for each instance... is this assumption correct? I suppose that may also depend on the severity of the migration. Thanks again, Brad
Flyway only does what you tell it. If you don't have delete statements for your data in your migrations, it will still be there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.