Changes between Version 41 and Version 42 of GenericTrac
- Timestamp:
- Nov 26, 2014, 12:09:22 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenericTrac
v41 v42 48 48 Note 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. 49 49 50 === Resource Content===50 === The ticket data model === 51 51 52 52 The ticket model is by far richer data model we would have to support, 53 53 so we could use it as a basis to lay out the foundations of the new model. 54 54 55 ==== Trac =< 1.1.3 model #legacy 55 56 For ticket, we currently have a fixed set of properties 56 57 (as columns in the `ticket` table) … … 60 61 Note that we'd like to get ''relations'' (or ''links'') as well, see #31. 61 62 62 ==== Properties63 63 Let's examine the advantages and disadvantages of each different styles of properties storage: 64 64 1. properties stored in columns of a main table: … … 79 79 80 80 (?) means ''yet to be verified'' 81 82 The current ticket tables look like this (`.schema ticket` and `.schema ticket_custom` in SQLite): 83 {{{ 84 CREATE 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 104 CREATE TABLE ticket_custom ( 105 ticket integer, 106 name text, 107 value text, 108 UNIQUE(ticket,name) 109 ); 110 }}} 111 112 Such a flat table makes it hard to get 1-n associations, or this has to be faked somehow (cf. the cc and keywords). 113 114 And for the "versioning" of ticket changes, we have (`.schema ticket_change`): 115 {{{ 116 CREATE 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 127 Squeezed in the above are the ticket comments, complete with "reply-to" information and their own versioning scheme ;-) 81 128 82 129