adjust minimum SQLite version

"without rowid" was introduced in 3.8.2, not 3.14.0. The latter
was just "without rowid" virtual tables, a more obscure feature.
This commit is contained in:
Scott Lamb 2021-08-19 10:57:00 -07:00
parent a574b51e26
commit 6270cc0ee4
2 changed files with 5 additions and 5 deletions

View File

@ -177,7 +177,7 @@ To build the server, you will need the following C libraries installed:
timeouts for RTSP. For reliable reconnections on error, it's strongly
recommended to use ffmpeg library versions >= 55.1.101.
* [SQLite3](https://www.sqlite.org/), at least version 3.14.0.
* [SQLite3](https://www.sqlite.org/), at least version 3.8.2.
(You can skip this if you compile with `--features=bundled` and
don't mind the `moonfire-nvr sql` command not working.)

View File

@ -2118,11 +2118,11 @@ pub(crate) fn set_integrity_pragmas(conn: &mut rusqlite::Connection) -> Result<(
}
pub(crate) fn check_sqlite_version() -> Result<(), Error> {
// SQLite version 3.14.0 introduced the "without rowid" syntax used in the schema.
// https://www.sqlite.org/vtab.html#worid
if rusqlite::version_number() < 3014000 {
// SQLite version 3.8.2 introduced the "without rowid" syntax used in the schema.
// https://www.sqlite.org/withoutrowid.html
if rusqlite::version_number() < 3008002 {
bail!(
"SQLite version {} is too old; need at least 3.14.0",
"SQLite version {} is too old; need at least 3.8.2",
rusqlite::version()
);
}