From 1f65b3fc87780dc9513b46952a5ddd399249665b Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 15 Dec 2019 22:28:48 -0800 Subject: [PATCH] Remove isSuspended property; add a try! when creating tables. --- Frameworks/SyncDatabase/SyncDatabase.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Frameworks/SyncDatabase/SyncDatabase.swift b/Frameworks/SyncDatabase/SyncDatabase.swift index 8c08bda08..f7d69a8a6 100644 --- a/Frameworks/SyncDatabase/SyncDatabase.swift +++ b/Frameworks/SyncDatabase/SyncDatabase.swift @@ -12,17 +12,12 @@ import RSDatabase public struct SyncDatabase { - /// When SyncDatabase is suspended, database calls will crash the app. - public var isSuspended: Bool { - return queue.isSuspended - } - private let syncStatusTable: SyncStatusTable private let queue: DatabaseQueue public init(databaseFilePath: String) { let queue = DatabaseQueue(databasePath: databaseFilePath) - queue.runCreateStatements(SyncDatabase.tableCreationStatements) + try! queue.runCreateStatements(SyncDatabase.tableCreationStatements) queue.vacuumIfNeeded(daysBetweenVacuums: 11) self.queue = queue