... | ... | @@ -23,7 +23,7 @@ Another option is to obtain `h2.jar` and `liquibase.zip` from another developer |
|
|
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.
|
|
|
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.
|
|
|
|
|
|
Alternatively you can generate a changelog with the following script:
|
... | ... | @@ -34,7 +34,7 @@ RESOURCES_DIR=$PROJ_DIR/src/main/resources |
|
|
liquibase \
|
|
|
--username=sa \
|
|
|
--password= \
|
|
|
--changeLogFile=$RESOURCES_DIR/changes.yaml \
|
|
|
--changeLogFile=$RESOURCES_DIR/new.yaml \
|
|
|
--driver=org.h2.Driver \
|
|
|
--url=jdbc:h2:$PROJ_DIR/testdb-old \
|
|
|
--classpath=/usr/local/apps/h2/h2-1.3.176.jar \
|
... | ... | |