... | ... | @@ -3,7 +3,7 @@ When an application is already deployed and changes to the database are necessar |
|
|
### Setup Liquibase:
|
|
|
|
|
|
1. Install Liquibase (just from their website).
|
|
|
2. Copy the `liquibase.template.properties` file in the root directory (if it isn't available in your project, head to the TAM repository and copy it from there).
|
|
|
2. Copy the `liquibase.template.properties` file in the root directory (if it isn't available in your project, head to the Queue or TAM repository and copy it from there).
|
|
|
3. Paste the copy into the root directory and rename it to `liquibase.properties`.
|
|
|
4. Check the `build.gradle.kts` file and find the `h2Version` variable. In the `classpath` variable, replace `VERSION` with the version as it appears in the variable.
|
|
|
5. Check the following path in your file explorer: `$HOME\.gradle\caches\modules-2\files-2.1\com.h2database\h2\VERSION` and find the folder containing a `.jar` file. Replace `HASH` in the `classpath` variable with the name of this folder.
|
... | ... | @@ -44,4 +44,21 @@ liquibase \ |
|
|
--referenceUrl=jdbc:h2:$PROJ_DIR/testdb-new \
|
|
|
--referenceUsername=sa \
|
|
|
--referencePassword=
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
|
|
|
## Common Errors
|
|
|
### Incompatible H2 Version
|
|
|
```
|
|
|
Caused by: org.h2.mvstore.MVStoreException: The write format 2 is smaller than the supported format 3 [2.2.224/5]
|
|
|
at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) ~[h2-2.2.224.jar:2.2.224]
|
|
|
at org.h2.mvstore.FileStore.getUnsupportedWriteFormatException(FileStore.java:943) ~[h2-2.2.224.jar:2.2.224]
|
|
|
at org.h2.mvstore.FileStore.processCommonHeaderAttributes(FileStore.java:547) ~[h2-2.2.224.jar:2.2.224]
|
|
|
at org.h2.mvstore.RandomAccessStore.readStoreHeader(RandomAccessStore.java:227) ~[h2-2.2.224.jar:2.2.224]
|
|
|
at org.h2.mvstore.FileStore.start(FileStore.java:916) ~[h2-2.2.224.jar:2.2.224]
|
|
|
at org.h2.mvstore.MVStore.<init>(MVStore.java:289) ~[h2-2.2.224.jar:2.2.224]
|
|
|
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035) ~[h2-2.2.224.jar:2.2.224]
|
|
|
at org.h2.mvstore.db.Store.<init>(Store.java:133) ~[h2-2.2.224.jar:2.2.224]
|
|
|
... 35 common frames omitted
|
|
|
```
|
|
|
|
|
|
This means the traces that were produced are written using an older version of the H2 driver that is not supported by a newer version of liquibase. Either downgrade your liquibase version or write the traces using a newer version of H2. |