         let storeCoordinator = NSPersistentStoreCoordinator(managedObjectModel: NSManagedObjectModel())
         try storeCoordinator.destroyPersistentStore(at: url, ofType: type, options: nil)
         
+        // in-memory stores have no file, and binary are deleted by `destroyPersistentStore`.
         if case .sqliteStore = self {
             // attempt to delete sqlite file and assocaited -wal and -shm files
             try deleteFileIfExists(fileUrl: url)

        self = .binaryStore(at: url)
    }
    
    var type: String {
        switch self {
        case .binaryStore: return NSBinaryStoreType
        case .sqliteStore: return NSSQLiteStoreType
        }
    }
    

                    object = try context.existingObject(with: self.objectID) as? ManagedObjectType
                }
                    // catch error from loading object from id
                catch { print(error) }
            }
        }
            // catch error from saving original context
        catch { print(error) }
        
        // if everything has gone without error, this will be the `this` object
        // loaded in the new context, otherwise it will be `nil`
