diff --git a/Sources/SQLite/Core/Connection+Pragmas.swift b/Sources/SQLite/Core/Connection+Pragmas.swift index 8f6d854b..2c4f0efb 100644 --- a/Sources/SQLite/Core/Connection+Pragmas.swift +++ b/Sources/SQLite/Core/Connection+Pragmas.swift @@ -7,7 +7,7 @@ public extension Connection { /// See SQLite [PRAGMA user_version](https://sqlite.org/pragma.html#pragma_user_version) var userVersion: UserVersion? { get { - (try? scalar("PRAGMA user_version") as? Int64).map(Int32.init) + (try? scalar("PRAGMA user_version") as? Int64)?.map(Int32.init) } set { _ = try? run("PRAGMA user_version = \(newValue ?? 0)")