Skip to content

Commit 46c1274

Browse files
committed
Update README.md
1 parent d7d97a0 commit 46c1274

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,17 @@ do {
119119
}
120120
````
121121

122-
#### Checking migrations
122+
#### Performing migrations
123123

124124
````swift
125125
let bundle = NSBundle(identifier: "com.MyApp.MyModelFramework")!
126126
let model = CoreDataModel(name: "MyModel", bundle: bundle)
127127
if model.needsMigration {
128-
// do migration
128+
do {
129+
try migrate(model)
130+
} catch {
131+
print("Failed to migrate model: \(error)")
132+
}
129133
}
130134
````
131135

0 commit comments

Comments
 (0)