From: Gustavo Martin Morcuende Date: Wed, 14 Sep 2016 12:57:13 +0000 (+0200) Subject: spring-jpa, liquibase, examples about how to update change sets in database X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=622d08139f5f0bd92299494432337ca7a95cda3d;p=JavaForFun spring-jpa, liquibase, examples about how to update change sets in database --- diff --git a/SpringJava/JPA/README b/SpringJava/JPA/README index 5b41f97..a1a9bd4 100644 --- a/SpringJava/JPA/README +++ b/SpringJava/JPA/README @@ -90,3 +90,11 @@ Postman-Token: 62441d69-daab-b4d2-e73a-efca92d93aeb # Changelog for DML. Creates DML changelog from current database (if there are data) /opt/liquibase/liquibase3.5.1/liquibase --driver=com.mysql.jdbc.Driver --classpath=$HOME/.m2/repository/mysql/mysql-connector-java/5.1.9/mysql-connector-java-5.1.9.jar --logLevel=debug --changeLogFile=src/main/resources/spring-configuration/liquibase/dmlChangelog.xml --url="jdbc:mysql://localhost/mybatis_example" --username=root --password=root --diffTypes="data" generateChangeLog + +# Update changelog DDL with new changeSets. +/opt/liquibase/liquibase3.5.1/liquibase --driver=com.mysql.jdbc.Driver --classpath=$HOME/.m2/repository/mysql/mysql-connector-java/5.1.9/mysql-connector-java-5.1.9.jar --logLevel=debug --changeLogFile=src/main/resources/spring-configuration/liquibase/ddlChangelog.xml --url="jdbc:mysql://localhost/mybatis_example" --username=root --password=root update + +# Update changelog DDL with selected changeSets (based on label expressions) +/opt/liquibase/liquibase3.5.1/liquibase --driver=com.mysql.jdbc.Driver --classpath=$HOME/.m2/repository/mysql/mysql-connector-java/5.1.9/mysql-connector-java-5.1.9.jar --logLevel=debug --changeLogFile=src/main/resources/spring-configuration/liquibase/ddlChangelog.xml --labels='!VERSIONC' --url="jdbc:mysql://localhost/mybatis_example" --username=root --password=root update + + diff --git a/SpringJava/JPA/spring-jpa-persistence/src/main/resources/spring-configuration/liquibase/ddlChangelog.xml b/SpringJava/JPA/spring-jpa-persistence/src/main/resources/spring-configuration/liquibase/ddlChangelog.xml index e2f5eb9..b2a96ad 100644 --- a/SpringJava/JPA/spring-jpa-persistence/src/main/resources/spring-configuration/liquibase/ddlChangelog.xml +++ b/SpringJava/JPA/spring-jpa-persistence/src/main/resources/spring-configuration/liquibase/ddlChangelog.xml @@ -1,5 +1,28 @@ + + +