Skip to content

Commit

Permalink
Update logging message text and MigrationMetaRow.toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-bygrave committed Nov 1, 2023
1 parent 10395c9 commit afaa4a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ final class MigrationMetaRow {

@Override
public String toString() {
return "id:" + id + " type:" + type + " runVersion:" + version + " comment:" + comment + " runOn:" + runOn + " runBy:" + runBy;
return "id:" + id + " type:" + type + " checksum:" + checksum + " runVersion:" + version + " comment:" + comment + " runOn:" + runOn + " runBy:" + runBy;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ boolean skipMigration(int checksum, int checksum2, LocalMigrationResource local,

} else if (patchLegacyChecksums && existing.checksum() == checksum2) {
if (!checkStateOnly) {
log.log(INFO, "Patch migration, set earlyChecksumMode on {0}", local.location());
log.log(INFO, "Patch migration, set early mode checksum on {0}", local.location());
existing.resetChecksum(checksum, connection, updateChecksumSql);
}
return true;
Expand Down Expand Up @@ -479,7 +479,7 @@ private String convertScript(String script) {
private void addMigration(String key, MigrationMetaRow metaRow) {
if (INIT_VER_0.equals(key)) {
if (metaRow.checksum() == EARLY_MODE_CHECKSUM && !earlyChecksumMode) {
throw new IllegalStateException("<init> 0 db migration row has unexpected checksum value? " + metaRow);
throw new IllegalStateException("Unexpected checksum value on <init> row " + metaRow);
}
initMetaRow = metaRow;
patchLegacyChecksums = earlyChecksumMode && metaRow.checksum() == LEGACY_MODE_CHECKSUM;
Expand Down
2 changes: 1 addition & 1 deletion ebean-migration/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</encoder>
</appender>

<root level="DEBUG">
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>

Expand Down

0 comments on commit afaa4a6

Please sign in to comment.