Default SQLite's user_version to zero.

I saw nil here with Sqlite.jsm.
This commit is contained in:
Richard Newman 2016-09-08 19:01:22 -07:00
parent b11b6c92d9
commit 9e4e95ce51

View file

@ -101,7 +101,9 @@
(defn get-user-version [db]
(go-pair
(let [row (first (<? (all-rows db ["PRAGMA user_version"])))]
(:user_version row))))
(or
(:user_version row)
0))))
(defn set-user-version [db version]
(execute! db [(str "PRAGMA user_version = " version)]))