Edgewall Software

Changes between Version 41 and Version 42 of GenericTrac


Ignore:
Timestamp:
Nov 26, 2014, 12:09:22 AM (9 years ago)
Author:
Christian Boos
Comment:

focusing on the ticket mode, presenting the #legacy model

Legend:

Unmodified
Added
Removed
Modified
  • GenericTrac

    v41 v42  
    4848Note that the persistence constraints imposed by the Trac data model are not necessarily only (or even best) approached using the RelationalModel, one could imagine that a future version could use more document-oriented persistence layers (e.g. [http://www.mongodb.org/ MongoDB]), or object-oriented databases (e.g. [http://www.zodb.org/ ZODB]). Also, as said above, the versioning of resources should be delegated to a version control backend, with a default, simple, in-database VCS backend.
    4949
    50 === Resource Content ===
     50=== The ticket data model ===
    5151
    5252The ticket model is by far richer data model we would have to support,
    5353so we could use it as a basis to lay out the foundations of the new model.
    5454
     55==== Trac =< 1.1.3 model #legacy
    5556For ticket, we currently have a fixed set of properties
    5657(as columns in the `ticket` table)
     
    6061Note that we'd like to get ''relations'' (or ''links'') as well, see #31.
    6162
    62 ==== Properties
    6363Let's examine the advantages and disadvantages of each different styles of properties storage:
    6464 1. properties stored in columns of a main table:
     
    7979
    8080(?) means ''yet to be verified''
     81
     82The current ticket tables look like this (`.schema ticket` and `.schema ticket_custom` in SQLite):
     83{{{
     84CREATE TABLE ticket (
     85        id              integer PRIMARY KEY,
     86        type            text,           -- the nature of the ticket
     87        time            integer,        -- the time it was created
     88        changetime      integer,
     89        component       text,
     90        severity        text,
     91        priority        text,
     92        owner           text,           -- who is this ticket assigned to
     93        reporter        text,
     94        cc              text,           -- email addresses to notify
     95        version         text,           --
     96        milestone       text,           --
     97        status          text,
     98        resolution      text,
     99        summary         text,           -- one-line summary
     100        description     text,           -- problem description (long)
     101        keywords        text
     102);
     103
     104CREATE TABLE ticket_custom (
     105       ticket               integer,
     106       name             text,
     107       value            text,
     108       UNIQUE(ticket,name)
     109);
     110}}}
     111
     112Such a flat table makes it hard to get 1-n associations, or this has to be faked somehow (cf. the cc and keywords).
     113
     114And for the "versioning" of ticket changes, we have (`.schema ticket_change`):
     115{{{
     116CREATE TABLE ticket_change (
     117    ticket integer,
     118    time integer,
     119    author text,
     120    field text,
     121    oldvalue text,
     122    newvalue text,
     123    UNIQUE (ticket,time,field)
     124);
     125}}}
     126
     127Squeezed in the above are the ticket comments, complete with "reply-to" information and their own versioning scheme ;-)
    81128
    82129