|
|
@ -13,7 +13,11 @@ enum _003_YDBToGRDBMigration: Migration {
|
|
|
|
static let minExpectedRunDuration: TimeInterval = 0.1
|
|
|
|
static let minExpectedRunDuration: TimeInterval = 0.1
|
|
|
|
|
|
|
|
|
|
|
|
static func migrate(_ db: Database) throws {
|
|
|
|
static func migrate(_ db: Database) throws {
|
|
|
|
guard !SNUtilitiesKit.isRunningTests else { return Storage.update(progress: 1, for: self, in: target) }
|
|
|
|
guard
|
|
|
|
|
|
|
|
!SNUtilitiesKit.isRunningTests &&
|
|
|
|
|
|
|
|
Identity.userExists(db)
|
|
|
|
|
|
|
|
else { return Storage.update(progress: 1, for: self, in: target) }
|
|
|
|
|
|
|
|
|
|
|
|
SNLogNotTests("[Migration Error] Attempted to perform legacy migation")
|
|
|
|
SNLogNotTests("[Migration Error] Attempted to perform legacy migation")
|
|
|
|
throw StorageError.migrationNoLongerSupported
|
|
|
|
throw StorageError.migrationNoLongerSupported
|
|
|
|
}
|
|
|
|
}
|
|
|
|