Bind migrations to build numbers

This commit is contained in:
Davide De Rosa 2018-10-25 20:32:42 +02:00
parent 082ffa3cb1
commit 12e0a55f7a
1 changed files with 6 additions and 3 deletions

View File

@ -46,9 +46,12 @@ extension ConnectionService {
} }
// replace migration logic here // replace migration logic here
try migrateToWrappedSessionConfiguration(&json) let build = json["build"] as? Int ?? 0
try migrateToBaseConfiguration(&json) if build <= 1084 {
try migrateToBuildNumber(&json) try migrateToWrappedSessionConfiguration(&json)
try migrateToBaseConfiguration(&json)
try migrateToBuildNumber(&json)
}
return try JSONSerialization.data(withJSONObject: json, options: []) return try JSONSerialization.data(withJSONObject: json, options: [])
} }