= Trac and SQLAlchemy Trac works with the [http://www.sqlalchemy.org/ SQLAlchemy] database wrapper. Instructions for installing and using SQLAlchemy are listed at th:SqlAlchemyQueryMacro. == List of things to do 1. trac/db/*backend.py files should ultimately be collapsed into one backend.py file 1. trac/upgrades/db*.py files need upgrading to SQLAlchemy 1. database schema needs a review, see MySQL fault later on the page 1. database schema needs relations setup and especially separating out a 'user' table, helps with user provider architecture, eg LDAP == Tables The current database schema has deficiencies. * system table * permission table * auth_cookie table * session table * session_attribute table * attachment table: id is text, for ticket type it is a number, for wiki it is an unique text identifier * wiki table * revision table * node_change table * ticket table * ticket_change table * ticket_custom table * enum table * component table * milestone table * version table * report table == Known issues When Trac is installed with MySQL, the initialization fails with: {{{ OperationalError: (OperationalError) (1170, "BLOB/TEXT column 'rev' used in key specification without a key length") 'CREATE TABLE node_change (rev TEXT NOT NULL, path TEXT NOT NULL, node_type VARCHAR(1), change_type VARCHAR(1) NOT NULL, base_path TEXT, base_rev TEXT, PRIMARY KEY (rev, path, change_type))' {} }}}