Skip to content

Commit

Permalink
implement flyway migration for config database normalization + tests (#…
Browse files Browse the repository at this point in the history
…8563)

* implement flyway migration for config database normalization + tests

* use Enums + create connection operation table

* address review comments

* format

* undo change

* handle null value for enums

* implement new database config persistence (#8620)

* implement new database config persistence

* make new persistence compatible with applications

* update tests

* do not update createdAt timestamp

* review comments + incorporate changes from bootloader

* address review comments

* fixed test + remove unused method

* fix archive handler test

* handle null value for tombstone

* add logs for assert migration

* final review comments
  • Loading branch information
subodh1810 committed Dec 21, 2021
1 parent 115b0f9 commit 8654c4a
Show file tree
Hide file tree
Showing 36 changed files with 5,833 additions and 473 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void testBootloaderAppBlankDb() throws Exception {
mockedConfigs.getConfigDatabaseUrl())
.getAndInitialize();
val configsMigrator = new ConfigsDatabaseMigrator(configDatabase, this.getClass().getName());
assertEquals("0.30.22.001", configsMigrator.getLatestMigration().getVersion().getVersion());
assertEquals("0.32.8.001", configsMigrator.getLatestMigration().getVersion().getVersion());

val jobsPersistence = new DefaultJobPersistence(jobDatabase);
assertEquals(version, jobsPersistence.getVersion().get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public static <T> T deserialize(final String jsonString, final Class<T> klass) {
}
}

public static <T> T convertValue(final Object object, final Class<T> klass) {
return OBJECT_MAPPER.convertValue(object, klass);
}

public static JsonNode deserialize(final String jsonString) {
try {
return OBJECT_MAPPER.readTree(jsonString);
Expand Down

Large diffs are not rendered by default.

0 comments on commit 8654c4a

Please sign in to comment.