Edgewall Software

Version 3 (modified by Jeroen Ruigrok van der Werven, 16 years ago) ( diff )

Trac and SQLAlchemy

List of things to do

  1. trac/db/*backend.py files should ultimately be collapsed into one backend.py file
  2. trac/upgrades/db*.py files need upgrading to SQLAlchemy
  3. database schema needs a review, see MySQL fault later on the page

The current database schema has deficiencies.

Tables

  • 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

Current problems:

MySQL 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))' {}
Note: See TracWiki for help on using the wiki.