Index: topia-service/src/java/org/codelutin/topia/migration/DatabaseManager.java diff -u topia-service/src/java/org/codelutin/topia/migration/DatabaseManager.java:1.3 topia-service/src/java/org/codelutin/topia/migration/DatabaseManager.java:1.4 --- topia-service/src/java/org/codelutin/topia/migration/DatabaseManager.java:1.3 Fri Nov 9 16:35:45 2007 +++ topia-service/src/java/org/codelutin/topia/migration/DatabaseManager.java Fri Nov 9 17:18:03 2007 @@ -34,9 +34,7 @@ import org.hibernate.exception.JDBCConnectionException; import org.hibernate.exception.SQLGrammarException; import org.hibernate.mapping.ForeignKey; -import org.hibernate.mapping.Index; import org.hibernate.mapping.Table; -import org.hibernate.mapping.UniqueKey; import org.hibernate.tool.hbm2ddl.SchemaExport; /** @@ -49,9 +47,9 @@ * @author Chevallereau Benjamin * @author Eon Sébastien * @author Trève Vincent - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ * - * Last update : $Date: 2007-11-09 16:35:45 $ + * Last update : $Date: 2007-11-09 17:18:03 $ */ public class DatabaseManager { @@ -211,7 +209,7 @@ // voir si les relation *<->* sont listees par l'iterateur // -> ok, normalement c bon, c gere - // bug: sans cette ligne, les tables many-to-many ne sont pas listées + // bug: sans cette ligne, les tables many-to-many ne sont pas list�es oldConfiguration.buildMappings(); Iterator i = oldConfiguration.getTableMappings(); @@ -225,7 +223,9 @@ while(fKeys.hasNext()) { ForeignKey fKey = fKeys.next(); - logger.debug("Changing constraints name : " + fKey.getName() + " to " + fKey.getName() + vdbVersion.getValidName()); + if(logger.isTraceEnabled()) { + logger.trace("Changing constraints name : " + fKey.getName() + " to " + fKey.getName() + vdbVersion.getValidName()); + } fKey.setName(fKey.getName() + vdbVersion.getValidName()); } @@ -233,7 +233,7 @@ String newTableName = tableName + getTableSuffixForVersion(vdbVersion); // rennomage dans la config - logger.debug("Renaming table " + tableName + " to " + newTableName + " " + table.hasDenormalizedTables()); + logger.debug("Renaming table " + tableName + " to " + newTableName); table.setName(newTableName); } } @@ -273,7 +273,7 @@ protected void dropSchema(Configuration configuration) { // supprimer le schema en base SchemaExport schemaExport = new SchemaExport(configuration); - schemaExport.drop(true, true); + schemaExport.drop(false, true); } /**