Rename core data store during migration
This commit is contained in:
@@ -109,7 +109,8 @@
|
|||||||
- (NSPersistentContainer *)persistentContainer {
|
- (NSPersistentContainer *)persistentContainer {
|
||||||
@synchronized (self) {
|
@synchronized (self) {
|
||||||
if (_persistentContainer == nil) {
|
if (_persistentContainer == nil) {
|
||||||
_persistentContainer = [[NSPersistentContainer alloc] initWithName:@"DBv1"];
|
NSManagedObjectModel *mom = [NSManagedObjectModel mergedModelFromBundles:nil];
|
||||||
|
_persistentContainer = [[NSPersistentContainer alloc] initWithName:@"Library" managedObjectModel:mom];
|
||||||
[_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) {
|
[_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) {
|
||||||
if ([error inCaseLog:"Couldn't read NSPersistentContainer"])
|
if ([error inCaseLog:"Couldn't read NSPersistentContainer"])
|
||||||
abort();
|
abort();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14460.32" systemVersion="17G8030" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="v1">
|
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14460.32" systemVersion="17G8030" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="v1.0.0">
|
||||||
<entity name="Feed" representedClassName="Feed" syncable="YES" codeGenerationType="class">
|
<entity name="Feed" representedClassName="Feed" syncable="YES" codeGenerationType="class">
|
||||||
<attribute name="indexPath" optional="YES" attributeType="String" syncable="YES"/>
|
<attribute name="indexPath" optional="YES" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="link" optional="YES" attributeType="String" syncable="YES"/>
|
<attribute name="link" optional="YES" attributeType="String" syncable="YES"/>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>14344</string>
|
<string>14360</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.news</string>
|
<string>public.app-category.news</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
|||||||
@@ -4,7 +4,22 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>Move</key>
|
<key>Move</key>
|
||||||
<array>
|
<array>
|
||||||
<string>${ApplicationSupport}/$(PRODUCT_NAME)</string>
|
<array>
|
||||||
|
<string>${ApplicationSupport}/$(PRODUCT_NAME)/DBv1.sqlite</string>
|
||||||
|
<string>${ApplicationSupport}/$(PRODUCT_NAME)/Library.sqlite</string>
|
||||||
|
</array>
|
||||||
|
<array>
|
||||||
|
<string>${ApplicationSupport}/$(PRODUCT_NAME)/DBv1.sqlite-shm</string>
|
||||||
|
<string>${ApplicationSupport}/$(PRODUCT_NAME)/Library.sqlite-shm</string>
|
||||||
|
</array>
|
||||||
|
<array>
|
||||||
|
<string>${ApplicationSupport}/$(PRODUCT_NAME)/DBv1.sqlite-wal</string>
|
||||||
|
<string>${ApplicationSupport}/$(PRODUCT_NAME)/Library.sqlite-wal</string>
|
||||||
|
</array>
|
||||||
|
<array>
|
||||||
|
<string>${ApplicationSupport}/$(PRODUCT_NAME)</string>
|
||||||
|
<string>${ApplicationSupport}/$(PRODUCT_NAME)/old_data</string>
|
||||||
|
</array>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Reference in New Issue
Block a user