Merge commit 'ffdf837'
[simantics/platform.git] / bundles / org.simantics / src / org / simantics / SimanticsPlatform.java
index 09d632a3edce942d288a44d8f1b8a19d51cda9c6..11013eaf7e32ffd1f09fbc4477ed074c2dad21e7 100644 (file)
@@ -737,7 +737,17 @@ public class SimanticsPlatform implements LifecycleListener {
         // 1. Assert there is a database at <workspace>/db
         session = setupDatabase(databaseDriverId, progressMonitor, workspacePolicy, userAgent);
         TimeLogger.log("Database setup complete");
-
+        
+        // 1.1 
+        XSupport support = session.getService(XSupport.class);
+        if (support.rolledback()) {
+            try {
+                DatabaseIndexing.deleteAllIndexes();
+            } catch (IOException e) {
+                throw new PlatformException(e);
+            }
+        }
+        
         // 2. Assert all graphs, and correct versions, are installed to the database
         synchronizeOntologies(progressMonitor, ontologyPolicy, requireSynchronize);
         TimeLogger.log("Synchronized ontologies");