Skip to content

Commit 5f5ad81

Browse files
authored
Reset userVersion if set to nil
1 parent 946f69e commit 5f5ad81

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: Sources/SQLite/Core/Connection.swift

+1-3
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ public final class Connection {
159159
(try? scalar("PRAGMA user_version") as? Int64).map(Int32.init)
160160
}
161161
set {
162-
if let userVersion = newValue {
163-
_ = try? run("PRAGMA user_version = \(userVersion)")
164-
}
162+
_ = try? run("PRAGMA user_version = \(newValue ?? 0)")
165163
}
166164
}
167165

0 commit comments

Comments
 (0)