I build my queries usually via binding within the function I'm calling, which I don't think changes the schema version, since I'm only seeing a bump of +1 at application close during either a vacuum or the backup API call.
That said, since I know that the backup API will make the schema version change, is it safe to read the schema_version at the beginning of the application, retain it for the life time of the application, then after the backup is written, rewrite the schema version to the backup? In my case, and for the application I'm tuning for this initial venture into SQL revision control, I'm using the term "backup" incorrectly. I use the "backup" API to load the database into memory, and then at application termination, I use the "backup" API to overwrite the database I just loaded from disk. I don't think I maintain a file handle to the file, but I'd have to check. On Thu, Sep 8, 2016 at 6:01 AM, Richard Hipp <d...@sqlite.org> wrote: > > > There are no writes to the database files that result from an ATTACH > or DETACH, so the "schema version" numbers do not change in that case. > But all existing prepared statements do automatically get reprepared > upon next use, which triggers SQLITE_SCHEMA messages in the error and > warning log. > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users