diff --git a/model/api/src/main/java/org/keycloak/migration/MigrationModelManager.java b/model/api/src/main/java/org/keycloak/migration/MigrationModelManager.java index a0e5959091..62dcd68dd5 100755 --- a/model/api/src/main/java/org/keycloak/migration/MigrationModelManager.java +++ b/model/api/src/main/java/org/keycloak/migration/MigrationModelManager.java @@ -16,16 +16,15 @@ public class MigrationModelManager { String storedVersion = model.getStoredVersion(); if (MigrationModel.LATEST_VERSION.equals(storedVersion)) return; ModelVersion stored = null; - if (storedVersion == null) stored = new ModelVersion(0, 0, 0); - else stored = new ModelVersion(storedVersion); + if (storedVersion != null) new ModelVersion(storedVersion); - if (stored.lessThan(MigrationTo1_2_0_CR1.VERSION)) { - logger.info("Migrating older model to 1.2.0.RC1 updates"); + if (stored == null || stored.lessThan(MigrationTo1_2_0_CR1.VERSION)) { + if (stored != null) { + logger.debug("Migrating older model to 1.2.0.RC1 updates"); + } new MigrationTo1_2_0_CR1().migrate(session); } model.setStoredVersion(MigrationModel.LATEST_VERSION); - - } } diff --git a/testsuite/integration/src/test/resources/log4j.properties b/testsuite/integration/src/test/resources/log4j.properties index d94d2f9c74..a776341146 100755 --- a/testsuite/integration/src/test/resources/log4j.properties +++ b/testsuite/integration/src/test/resources/log4j.properties @@ -18,6 +18,7 @@ log4j.logger.org.keycloak=info # log4j.logger.org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider=debug # log4j.logger.org.keycloak.connections.mongo.updater.DefaultMongoUpdaterProvider=debug # log4j.logger.org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory=debug +# log4j.logger.org.keycloak.migration.MigrationModelManager=debug # Enable to view kerberos/spnego logging # log4j.logger.org.keycloak.broker.kerberos=trace