kalikiana/dxr — pull request #1 by kalikiana (2011-12-08 12:34:01+00:00)
Title: Database versioning

I'm introducing functions in the "dxr" module.

get_database_filename(treecfg)
open_database(filename, sql)
get_database_version(conn, token)
set_database_version(conn, token, version)

The filename is separate since the search frontend doesn't use the config class but has the filename.
The sql in open_database() is for PRAGMA essentially.

Note that the bootstrapping of getinfo.cgi and search.cgi is still duplicated. We could probably add a local mini module there if we find other things to put in it.

For now, database version is not required and never set. I figure we can wait until we actually have a change to enforce it, and possibly add an upgrade process.