Skip to content

Commit

Permalink
Reset userVersion if set to nil
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfallet committed Jan 25, 2022
1 parent 946f69e commit 5f5ad81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/SQLite/Core/Connection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ public final class Connection {
(try? scalar("PRAGMA user_version") as? Int64).map(Int32.init)
}
set {
if let userVersion = newValue {
_ = try? run("PRAGMA user_version = \(userVersion)")
}
_ = try? run("PRAGMA user_version = \(newValue ?? 0)")

This comment has been minimized.

Copy link
@jberkel

jberkel Jan 25, 2022

Collaborator

missing a test

}
}

Expand Down

0 comments on commit 5f5ad81

Please sign in to comment.