Commit 32dfdc0d authored by Sebastian Ramacher's avatar Sebastian Ramacher

Check if ALTER is supported

parent 797535ac
......@@ -15,7 +15,7 @@ The following dependencies are required:
The following dependencies are optional:
* sqlite3 (>= 3.5.9): splite3 database backend
* sqlite3 (>= 3.6.23): splite3 database backend
* libmagic from file(1): for mime-type detection
* libsynctex from TeXLive: SyncTeX support
* libseccomp: sandbox support
......
......@@ -68,7 +68,7 @@ flags = cc.get_supported_arguments(flags)
# optional dependencies
additional_sources = []
sqlite = dependency('sqlite3', version: '>=3.5.9', required: get_option('sqlite'))
sqlite = dependency('sqlite3', version: '>=3.6.23', required: get_option('sqlite'))
synctex = dependency('synctex', required: get_option('synctex'))
magic = cc.find_library('magic', required: get_option('magic'))
seccomp = dependency('libseccomp', required: get_option('seccomp'))
......
......@@ -251,6 +251,13 @@ sqlite_db_check_layout(sqlite3* session, const int database_version, const bool
if (new_db == true)
return;
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
if (sqlite3_compileoption_used("SQLITE_OMIT_ALTERTABLE") == 1) {
girara_error("sqlite3 built without support for ALTER, cannot update database");
return;
}
#endif
bool all_updates_ok = true;
if (database_version < 1)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment