Skip to content

Commit 5edb4f4

Browse files
committed
Updated the v5 data model
1 parent 60ca6bf commit 5edb4f4

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Storage/Storage/Model/Note+CoreDataProperties.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ extension Note {
1717
@NSManaged public var type: String?
1818
@NSManaged public var url: String?
1919
@NSManaged public var title: String?
20-
@NSManaged public var subject: Data
21-
@NSManaged public var header: Data
22-
@NSManaged public var body: Data
23-
@NSManaged public var meta: Data
20+
@NSManaged public var subject: Data?
21+
@NSManaged public var header: Data?
22+
@NSManaged public var body: Data?
23+
@NSManaged public var meta: Data?
2424
}

Storage/Storage/Model/WooCommerce.xcdatamodeld/Model 5.xcdatamodel/contents

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
<attribute name="username" attributeType="String" syncable="YES"/>
99
</entity>
1010
<entity name="Note" representedClassName="Note" syncable="YES">
11-
<attribute name="body" attributeType="Binary" syncable="YES"/>
12-
<attribute name="header" attributeType="Binary" syncable="YES"/>
11+
<attribute name="body" optional="YES" attributeType="Binary" syncable="YES"/>
12+
<attribute name="header" optional="YES" attributeType="Binary" syncable="YES"/>
1313
<attribute name="icon" optional="YES" attributeType="String" syncable="YES"/>
14-
<attribute name="meta" attributeType="Binary" syncable="YES"/>
14+
<attribute name="meta" optional="YES" attributeType="Binary" syncable="YES"/>
1515
<attribute name="noteHash" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
1616
<attribute name="noteID" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
1717
<attribute name="noticon" optional="YES" attributeType="String" syncable="YES"/>
1818
<attribute name="read" attributeType="Boolean" usesScalarValueType="YES" syncable="YES"/>
19-
<attribute name="subject" attributeType="Binary" syncable="YES"/>
19+
<attribute name="subject" optional="YES" attributeType="Binary" syncable="YES"/>
2020
<attribute name="timestamp" attributeType="String" syncable="YES"/>
2121
<attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
2222
<attribute name="type" optional="YES" attributeType="String" syncable="YES"/>

Yosemite/Yosemite/Model/Storage/Note+ReadOnlyConvertible.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ extension Storage.Note: ReadOnlyConvertible {
3535
type: type ?? "",
3636
url: url,
3737
title: title,
38-
subject: subject,
39-
header: header,
40-
body: body,
41-
meta: meta)
38+
subject: subject ?? Data(),
39+
header: header ?? Data(),
40+
body: body ?? Data(),
41+
meta: meta ?? Data())
4242
}
4343
}

0 commit comments

Comments
 (0)