Edgewall Software

Changes between Version 7 and Version 8 of GenericTrac


Ignore:
Timestamp:
Sep 3, 2009, 6:14:32 PM (15 years ago)
Author:
Christian Boos
Comment:

summary of the model + example

Legend:

Unmodified
Added
Removed
Modified
  • GenericTrac

    v7 v8  
    146146
    147147The property changes themselves are stored in other tables.
     148We only need the changed properties here, no need to store the old/new values
     149for each change, as this can be deduced from the past changes.
     150Deletions of fields should be represented by setting a field to the NULL value.
    148151
    149152Several possibilities here:
    150 '''ticket_change''
    151 || ''id'' || ''changeid'' || ''name'' || ''value'' ||
    152 '''milestone_change''
    153 || ''id'' || ''changeid'' || ''name'' || ''value'' ||
     153
     154'''ticket_change'''
     155|| ''id'' || ''changeid'' || ''name'' || ''value'' ||
     156
     157'''milestone_change'''
     158|| ''id'' || ''changeid'' || ''name'' || ''value'' ||
     159
    154160or:
    155 '''resource_change''
     161
     162'''resource_change'''
    156163|| ''id'' || ''changeid'' || ''name'' || ''value'' ||
    157164(surrogate key approach)
     
    166173
    167174See also ticket:6466#comment:10 and follow-ups for a discussion about how ticket changes and in particular ticket change edits, could be handled using this approach.
     175
     176== The Model ==
     177
     178To summarize the above discussion, here's what could be the new model.
     179
     180=== Minimal Model ===
     181 - surrogate keys for all resources
     182 - only text fields
     183
     184
     185{{{
     186#!div style="width: 30%; float: left"
     187
     188==== Schema ====
     189
     190'''resource_schema'''
     191|| ''realm'' || ''prop'' || ''name'' || ''value'' ||
     192
     193'''resource_prop'''
     194|| ''id'' || ''name'' || ''value'' ||
     195
     196'''resource_revprop'''
     197|| ''changeid'' || ''name'' || ''value'' ||
     198
     199'''resource_change'''
     200|| ''id'' || ''changeid'' || ''name'' || ''value'' ||
     201}}}
     202{{{
     203#!div style="width: 60%; border: 2px dotted #ddd; padding: 0 0 1em 3em ; float: left;"
     204
     205==== Example Dataset ====
     206
     207'''resource_schema'''
     208|| ''realm'' || ''prop''    || ''name'' || ''value'' ||
     209|| ticket    || summary     || type     || text ||
     210|| ticket    || description || type     || wiki||
     211|| ticket    || reporter    || type     || text ||
     212
     213'''resource_prop'''
     214|| ''id'' || ''name''  || ''value'' ||
     215||      0 ||   id      ||   130     ||
     216||      0 || summary   ||Multiple Project Support||
     217||      0 ||description||One day... ||
     218||      0 || reporter  ||   joe     ||
     219
     220'''resource_revprop'''
     221|| ''changeid'' || ''name'' || ''value'' ||
     222||          1   ||  author  ||    joe    ||
     223||          1   ||   date   ||5 years ago||
     224||          2   ||  author  ||    joe    ||
     225||          2   ||   date   ||2 years ago||
     226||          2   || comment  || come on...||
     227||          3   ||  author  ||   cboos   ||
     228||          3   ||   date   ||1 year ago ||
     229||          3   || comment  || sure...   ||
     230
     231'''resource_change'''
     232|| ''id'' || ''changeid'' || ''name''  || ''value'' ||
     233||      0 ||          1   ||    id     ||130||
     234||      0 ||          1   ||  summary  ||Multiple Project Support||
     235||      0 ||          1   ||description||Should be easy...||
     236||      0 ||          1   ||  reporter ||joe||
     237||      0 ||          2   ||description||Should be easy... Redmine has it!||
     238||      0 ||          3   ||description||One day...||
     239}}}
     240
     241[[html(<br style="clear: both" />)]]
    168242
    169243