]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5219 Hibernate must not validate db schema
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 15 Apr 2014 20:00:18 +0000 (22:00 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 15 Apr 2014 20:00:18 +0000 (22:00 +0200)
sonar-core/src/main/java/org/sonar/core/persistence/DefaultDatabase.java
sonar-core/src/test/java/org/sonar/core/persistence/DefaultDatabaseTest.java

index 98a0613f612680adcf733e5e3a9a55994961529a..9cadd01fddbc090dc457a1e72208911891150992 100644 (file)
@@ -164,7 +164,6 @@ public class DefaultDatabase implements Database {
     }
     props.put(Environment.DIALECT, getDialect().getHibernateDialectClass().getName());
     props.put("hibernate.generate_statistics", "false");
-    props.put("hibernate.hbm2ddl.auto", VALIDATE);
     props.put(Environment.CONNECTION_PROVIDER, CustomHibernateConnectionProvider.class.getName());
 
     return props;
index a181290ee95b2be622ddfefee5d85fbe7d1bf61e..2bf2a1d1e6e933800ce2c8cab324fc656b28abd8 100644 (file)
@@ -137,6 +137,6 @@ public class DefaultDatabaseTest {
 
     Properties hibernateProps = database.getHibernateProperties();
 
-    assertThat(hibernateProps.getProperty("hibernate.hbm2ddl.auto")).isEqualTo("validate");
+    assertThat(hibernateProps.getProperty("hibernate.generate_statistics")).isEqualTo("false");
   }
 }