Marino Faggiana 6 ani în urmă
părinte
comite
fc239aa1dd
2 a modificat fișierele cu 4 adăugiri și 8 ștergeri
  1. 1 8
      iOSClient/AppDelegate.m
  2. 3 0
      iOSClient/Database/NCManageDatabase.swift

+ 1 - 8
iOSClient/AppDelegate.m

@@ -1512,14 +1512,7 @@
             }
         });
     }
-    
-    if (([actualVersion compare:@"2.22.9" options:NSNumericSearch] == NSOrderedAscending)) {
-        
-        [[NCManageDatabase sharedInstance] clearTable:[tableMetadata class] account:nil];
-        [[NCManageDatabase sharedInstance] clearTable:[tablePhotos class] account:nil];
-        [[NCManageDatabase sharedInstance] clearTable:[tableDirectory class] account:nil];
-    }
-    
+
     return YES;
 }
 

+ 3 - 0
iOSClient/Database/NCManageDatabase.swift

@@ -121,6 +121,9 @@ class NCManageDatabase: NSObject {
                 
                 if oldSchemaVersion < 41 {
                     migration.deleteData(forType: tableActivity.className())
+                    migration.deleteData(forType: tableMetadata.className())
+                    migration.deleteData(forType: tablePhotos.className())
+                    migration.deleteData(forType: tableDirectory.className())
                 }
         })