Author: vmassol
Date: 2008-02-05 23:55:39 +0100 (Tue, 05 Feb 2008)
New Revision: 7302
Modified:
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/main/java/com/xpn/xwiki/store/migration/AbstractXWikiMigrationManager.java
Log:
XWIKI-2066: Migrator fails to upgrade sub wiki databases
Modified:
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/main/java/com/xpn/xwiki/store/migration/AbstractXWikiMigrationManager.java
===================================================================
---
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/main/java/com/xpn/xwiki/store/migration/AbstractXWikiMigrationManager.java
2008-02-05 22:50:54 UTC (rev 7301)
+++
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/main/java/com/xpn/xwiki/store/migration/AbstractXWikiMigrationManager.java
2008-02-05 22:55:39 UTC (rev 7302)
@@ -114,6 +114,13 @@
context.setDatabase(database);
context.setOriginalDatabase(database);
try {
+ // Force the schema update since it's not been
executed yet for sub wikis
+ // databases.
+ // TODO: In the future intead of doing this, move all
the database schema
+ // update + migrations into XWiki's init (see
http://jira.xwiki.org/jira/browse/XWIKI-2075).
+
context.getWiki().getHibernateStore().updateSchema(context, false);
+
+ // Run the migrations on the current database
startMigrationsForDatabase(context);
} catch (XWikiException e) {
LOG.info("Failed to migrate database [" + database +
"]...", e);
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications