Browse Source

fix primary key db on share table

marinofaggiana 5 years ago
parent
commit
6f51057b7f

+ 1 - 1
iOSClient/Brand/File_Provider_Extension.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.23.8</string>
 	<key>CFBundleVersion</key>
-	<string>16</string>
+	<string>17</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/Share.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.23.8</string>
 	<key>CFBundleVersion</key>
-	<string>16</string>
+	<string>17</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/iOSClient.plist

@@ -63,7 +63,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>16</string>
+	<string>17</string>
 	<key>FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED</key>
 	<true/>
 	<key>Fabric</key>

+ 1 - 1
iOSClient/CCGlobal.h

@@ -81,7 +81,7 @@
 
 // Database Realm
 #define k_databaseDefault                               @"nextcloud.realm"
-#define k_databaseSchemaVersion                         60
+#define k_databaseSchemaVersion                         61
 
 // Intro selector
 #define k_intro_login                                   0

+ 4 - 0
iOSClient/Database/NCManageDatabase.swift

@@ -57,6 +57,10 @@ class NCManageDatabase: NSObject {
                     }
                 }
                 
+                if oldSchemaVersion < 61 {
+                    migration.deleteData(forType: tableShare.className())
+                }
+                
             }, shouldCompactOnLaunch: { totalBytes, usedBytes in
                 
                 // totalBytes refers to the size of the file on disk in bytes (data + free space)