| 1 | = Trac Database Schema = |
| 2 | |
| 3 | The database schema is defined in [source:/trunk/trac/db_default.py trac.db_default], along with the initial contents of the database, and default configuration values. The schema includes the tables listed below. |
| 4 | |
| 5 | || '''Table Name''' || '''Purpose''' || |
| 6 | || {{{attachment}}} || Descriptions of attachments (files themselves are stored on disk). || |
| 7 | || {{{auth_cookie}}} || User login cookies. || |
| 8 | || {{{component}}} || Values that can be used in a ticket's "component" field. The {{{owner}}} column is used as the default assignee for new tickets, if not overridden at the time of ticket submission. || |
| 9 | || {{{enum}}} || Maps integer IDs for issues' priorities, severities, etc. to human-readable names. || |
| 10 | || {{{milestone}}} || Project milestones. || |
| 11 | || {{{node_change}}} || For every changeset (as identified by the revision number), this table contains the nodes (i.e. files or directories) that have been added/modified/deleted. || |
| 12 | || {{{permission}}} || Username/action pairs describing who's allowed to do what. This table's contents also hold permission groups. || |
| 13 | || {{{report}}} || Stores the SQL to generate canned database reports. || |
| 14 | || {{{revision}}} || Changesets, containing the revision number, author, time, and log message. The list of files and directories modified by a changeset can be found by joining with {{{node_change}}} on the {{{rev}}} column. || |
| 15 | || {{{session}}} || Information about user settings, including name, email, and diff options. || |
| 16 | || {{{system}}} || System information such as the database version. || |
| 17 | || {{{ticket}}} || Tickets. || |
| 18 | || {{{ticket_change}}} || Changes to tickets, on a field-by-field basis. The field value {{{comment}}} is special: it associates a comment with a set of field changes. || |
| 19 | || {{{ticket_custom}}} || The values of custom ticket fields. || |
| 20 | || {{{version}}} || As in {{{component}}} and {{{milestone}}}, this holds the options of the drop-down {{{version}}} list on the ticket form. Every version can have a {{{time}}} set, although that is not presently used other than for ordering the list of versions in the UI. || |
| 21 | || {{{wiki}}} || Wiki pages (including old revisions). || |
| 22 | |
| 23 | ---- |
| 24 | See also: TracDev, TracDev/DatabaseUpgrades |