Update Migrations authored by Timur Oberhuber's avatar Timur Oberhuber
...@@ -23,7 +23,7 @@ Another option is to obtain `h2.jar` and `liquibase.zip` from another developer ...@@ -23,7 +23,7 @@ Another option is to obtain `h2.jar` and `liquibase.zip` from another developer
7. Run the project normally. 7. Run the project normally.
8. Now run this command: `liquibase --changelogFile=new.yaml diff-changelog`, there should now be a file called `new.yaml` in the root directory. 8. Now run this command: `liquibase --changelogFile=new.yaml diff-changelog`, there should now be a file called `new.yaml` in the root directory.
9. If you encounter errors during this step, check the `liquibase.properties` file for instructions. 9. If you encounter errors during this step, check the `liquibase.properties` file for instructions.
10. Now copy your changes from `changes.yaml` to the bottom of `migrations.yaml`. Double check whether the generated changelog makes sense. Sometimes, you might need to add default values or change column types. 10. Now copy your changes from `new.yaml` to the bottom of `migrations.yaml`. Double check whether the generated changelog makes sense. Sometimes, you might need to add default values or change column types.
11. Make sure to delete the `new.yaml` file before preforming more migrations. 11. Make sure to delete the `new.yaml` file before preforming more migrations.
Alternatively you can generate a changelog with the following script: Alternatively you can generate a changelog with the following script:
...@@ -34,7 +34,7 @@ RESOURCES_DIR=$PROJ_DIR/src/main/resources ...@@ -34,7 +34,7 @@ RESOURCES_DIR=$PROJ_DIR/src/main/resources
liquibase \ liquibase \
--username=sa \ --username=sa \
--password= \ --password= \
--changeLogFile=$RESOURCES_DIR/changes.yaml \ --changeLogFile=$RESOURCES_DIR/new.yaml \
--driver=org.h2.Driver \ --driver=org.h2.Driver \
--url=jdbc:h2:$PROJ_DIR/testdb-old \ --url=jdbc:h2:$PROJ_DIR/testdb-old \
--classpath=/usr/local/apps/h2/h2-1.3.176.jar \ --classpath=/usr/local/apps/h2/h2-1.3.176.jar \
... ...
......