= PySqlite = [http://initd.org/tracker/pysqlite PySqlite] is a Python binding for the [http://www.sqlite.org SQLite] light-weight database engine, which is Trac's default DatabaseBackend. It should still be possible to use the old SQLite 2.8.x with the Pysqlite [http://initd.org/pub/software/pysqlite/releases/1.0/1.0.1 1.0.1], but Trac 0.9 works best with '''SQLite 3.2.x'''. The compatible Python bindings are: * either the 1.x release branch of PySqlite (version 1.1.6 as of this writing) * or, better, the newer 2.0.x release branch (version >= 2.0.5 preferred) * the not yet released 2.1.0 version appears to work well with Trac, using pysqlite's trunk version 194. This release branch features a new statement cache and a better handling of concurrent write operations. Recent versions are available from [http://initd.org/tracker/pysqlite/wiki#Downloads there]. '''Note:''' If you want to use Trac in a multi-threaded setup by using either TracModPython or TracStandalone, be sure to build a '''thread-safe version of SQLite''', by using the `--enable-threadsafe` configuration switch. If you use a non thread-safe library, which is unfortunately what you get by default on non-windows platforms, you face the risk to get persistent database locks (see #2170). == Upgrading SQLite from 2.x to 3.x == The following information is copied from http://dev.ctor.org/pkcs1/wiki/TracUpgrade The database formats used by SQLite 2.x and sqlite 3.x are incompatible. If you upgrade your SQLite version (this can also happen implicitly if you upgrade from PySQLite 1.0.x to 1.1.x or 2.x), then you must convert your database. To do this, install both SQLite 2.8 and SQLite 3.x (they have different filenames so can coexist in the same directory). Then use the following commands (Windows): {{{ $ mv trac.db trac2.db $ sqlite trac2.db .dump | sqlite3 trac.db }}} Then when you're happy with the conversion and tested everything you can delete the trac2.db file. For more information see http://www.sqlite.org/version3.html