Skip to content

Commit db2bfa4

Browse files
authored
Merge pull request #36 from cryptomator/feature/migrate-grdb-5-to-6
Migrate from GRDB 5 to GRDB 6
2 parents e08e0f2 + b864495 commit db2bfa4

File tree

15 files changed

+20
-20
lines changed

15 files changed

+20
-20
lines changed

CryptomatorCloudAccess.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@
18771877
repositoryURL = "https://github.com/groue/GRDB.swift.git";
18781878
requirement = {
18791879
kind = upToNextMinorVersion;
1880-
minimumVersion = 5.26.0;
1880+
minimumVersion = 6.29.1;
18811881
};
18821882
};
18831883
74F93565251F6863001F4ADA /* XCRemoteSwiftPackageReference "promises" */ = {

CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let package = Package(
3636
.package(url: "https://github.com/google/GTMAppAuth.git", .upToNextMinor(from: "4.0.0")),
3737
.package(url: "https://github.com/google/gtm-session-fetcher.git", .upToNextMinor(from: "3.1.0")),
3838
.package(url: "https://github.com/google/promises.git", .upToNextMinor(from: "2.3.0")),
39-
.package(url: "https://github.com/groue/GRDB.swift.git", .upToNextMinor(from: "5.26.0")),
39+
.package(url: "https://github.com/groue/GRDB.swift.git", .upToNextMinor(from: "6.29.1")),
4040
.package(url: "https://github.com/openid/AppAuth-iOS.git", .upToNextMinor(from: "1.6.0")),
4141
.package(url: "https://github.com/pCloud/pcloud-sdk-swift.git", .upToNextMinor(from: "3.2.0")),
4242
.package(url: "https://github.com/phil1995/dropbox-sdk-obj-c-spm.git", .upToNextMinor(from: "7.2.0")),

Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class BoxIdentifierCache {
1313
private let inMemoryDB: DatabaseQueue
1414

1515
init() throws {
16-
self.inMemoryDB = DatabaseQueue()
16+
self.inMemoryDB = try DatabaseQueue()
1717
try inMemoryDB.write { db in
1818
try db.create(table: BoxItem.databaseTableName) { table in
1919
table.column(BoxItem.cloudPathKey, .text).notNull().primaryKey()

Sources/CryptomatorCloudAccess/Box/BoxItem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extension BoxItem {
3636
}
3737

3838
extension BoxItem: PersistableRecord {
39-
func encode(to container: inout PersistenceContainer) {
39+
func encode(to container: inout PersistenceContainer) throws {
4040
container[BoxItem.cloudPathKey] = cloudPath
4141
container[BoxItem.identifierKey] = identifier
4242
container[BoxItem.itemTypeKey] = itemType

Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord {
1919
}
2020

2121
extension CachedEntry: PersistableRecord {
22-
func encode(to container: inout PersistenceContainer) {
22+
func encode(to container: inout PersistenceContainer) throws {
2323
container[CachedEntry.cleartextPathKey] = cleartextPath
2424
container[CachedEntry.dirIdKey] = dirId
2525
}
@@ -29,7 +29,7 @@ class DirectoryIdCache {
2929
private let inMemoryDB: DatabaseQueue
3030

3131
init() throws {
32-
self.inMemoryDB = DatabaseQueue()
32+
self.inMemoryDB = try DatabaseQueue()
3333
try inMemoryDB.write { db in
3434
try db.create(table: CachedEntry.databaseTableName) { table in
3535
table.column(CachedEntry.cleartextPathKey, .text).notNull().primaryKey()

Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord {
2525
}
2626

2727
extension CachedEntry: PersistableRecord {
28-
func encode(to container: inout PersistenceContainer) {
28+
func encode(to container: inout PersistenceContainer) throws {
2929
container[CachedEntry.shortenedNameKey] = shortenedName
3030
container[CachedEntry.originalNameKey] = originalName
3131
}
@@ -48,7 +48,7 @@ class VaultFormat6ShortenedNameCache {
4848
init(vaultPath: CloudPath) throws {
4949
self.vaultPath = vaultPath
5050
self.ciphertextNameCompIdx = vaultPath.pathComponents.lastItemIndex() + 4
51-
self.inMemoryDB = DatabaseQueue()
51+
self.inMemoryDB = try DatabaseQueue()
5252
try inMemoryDB.write { db in
5353
try db.create(table: CachedEntry.databaseTableName) { table in
5454
table.column(CachedEntry.shortenedNameKey, .text).notNull().primaryKey()

Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord {
3131
}
3232

3333
extension CachedEntry: PersistableRecord {
34-
func encode(to container: inout PersistenceContainer) {
34+
func encode(to container: inout PersistenceContainer) throws {
3535
container[CachedEntry.shortenedNameKey] = shortenedName
3636
container[CachedEntry.originalNameKey] = originalName
3737
}
@@ -106,7 +106,7 @@ class VaultFormat7ShortenedNameCache {
106106
self.vaultPath = vaultPath
107107
self.threshold = threshold
108108
self.ciphertextNameCompIdx = vaultPath.pathComponents.lastItemIndex() + 4
109-
self.inMemoryDB = DatabaseQueue()
109+
self.inMemoryDB = try DatabaseQueue()
110110
try inMemoryDB.write { db in
111111
try db.create(table: CachedEntry.databaseTableName) { table in
112112
table.column(CachedEntry.shortenedNameKey, .text).notNull().primaryKey()

Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class GoogleDriveIdentifierCache {
1313
private let inMemoryDB: DatabaseQueue
1414

1515
init() throws {
16-
self.inMemoryDB = DatabaseQueue()
16+
self.inMemoryDB = try DatabaseQueue()
1717
try inMemoryDB.write { db in
1818
try db.create(table: GoogleDriveItem.databaseTableName) { table in
1919
table.column(GoogleDriveItem.cloudPathKey, .text).notNull().primaryKey()

0 commit comments

Comments
 (0)