Liquibase + Maven: How to keep both testing DB and developing DB updated during mvn build?

StackOverflow https://stackoverflow.com/questions/21409774

  •  03-10-2022
  •  | 
  •  

Pergunta

I am very new using liquibase.

I have a JSP web application (no framework used), and I use a mysql db schema for testing and other one for developing.

I want to know how can I configure liquibase maven plugin to update both DB's on building time.

Foi útil?

Solução

You should use the context attribute for this sort of things. More details here http://www.liquibase.org/documentation/contexts.html

To update both DBs, the maven commands would look like the following:

mvn liquibase:update -Dliquibase.contexts=dev

mvn liquibase:update -Dliquibase.contexts=test
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top