Edgewall Software

Changes between Version 2 and Version 3 of GenericTrac/Brainstorm


Ignore:
Timestamp:
Aug 3, 2010, 7:15:17 PM (14 years ago)
Author:
Christian Boos
Comment:

adapt the example to the latest developments in GenericTrac

Legend:

Unmodified
Added
Removed
Modified
  • GenericTrac/Brainstorm

    v2 v3  
     1
    12= Ideas for the GenericTrac data model =
    23
     
    2223==== Schema ====
    2324
    24 ||||||||=  '''resource_prop'''  ||
    25 ||= id ||= prop ||= value ||= seq ||
    26 || int || string || text || int ||
    27 |-----------------------------------------------
    28 ||||||||=  '''resource_revprop''' ||
    29 ||= changeid ||= revprop ||= value ||= seq ||
    30 || int || string || text || int ||
    31 |-----------------------------------------------
    32 ||||||||=  '''resource_prop_string''' ||
    33 ||= id ||= prop ||= value ||= seq ||
    34 || int || string || string || int ||
    35 |-----------------------------------------------
    36 ||||||||=  '''resource_revprop_string''' ||
    37 ||= changeid ||= revprop ||= value ||= seq ||
    38 || int || string || string || int ||
    39 |-----------------------------------------------
    40 ||||||||=  '''resource_prop_int'''
    41 ||= id ||= prop ||= value ||= seq ||
    42 || int || string || int || int ||
    43 |-----------------------------------------------
    44 ||||||||=  '''resource_revprop_int''' ||
    45 ||= changeid ||= revprop ||= value ||= seq ||
    46 || int || string || int || int ||
    47 |-----------------------------------------------
    48 \\
    49 |-----------------------------------------------
    50 ||||||||=  '''resource_change''' ||
    51 ||= id ||= changeid ||= prop ||= value ||= seq ||
    52 || int || int || string || text || int ||
    53 |-----------------------------------------------
    54 ||||||||=  '''resource_change_string'''
    55 ||= id ||= changeid ||= prop ||= value ||= seq ||
    56 || int || int || string || string || int ||
    57 |-----------------------------------------------
    58 ||||||||=  '''resource_change_int''' ||
    59 ||= id ||= changeid ||= prop ||= value ||= seq ||
    60 || int || int || string || int || int ||
     25The generic scheme for a given ''resource'':
     26
     27||||||||=  '''{resource}_prop'''  ||
     28||= id ||= prop ||= value ||= seq ||
     29|| int || string || biging || bigint ||
     30|-----------------------------------------------
     31||||||||=  '''{resource}_prop_string''' ||
     32||= id ||= prop ||= value ||= seq ||
     33|| int || string || string || bigint ||
     34|-----------------------------------------------
     35||||||||=  '''{resource}_prop_text'''
     36||= id ||= prop ||= value ||= seq ||
     37|| int || string || text || bigint ||
     38|-----------------------------------------------
     39
     40The generic scheme for the ''resource'' change metadata:
     41
     42|-----------------------------------------------
     43||||||||=  '''{resource}_rev_prop''' ||
     44||= id ||= prop ||= value ||= seq ||
     45|| int || string || bigint || bigint ||
     46|-----------------------------------------------
     47||||||||=  '''{resource}_rev_prop_string''' ||
     48||= id ||= prop ||= value ||= seq ||
     49|| int || string || string || bigint ||
     50|-----------------------------------------------
     51||||||||=  '''{resource}_rev_prop_text''' ||
     52||= id ||= prop ||= value ||= seq ||
     53|| int || string || text || bigint ||
     54|-----------------------------------------------
     55
     56The generic scheme for the ''resource'' changes themselves:
     57
     58|-----------------------------------------------
     59||||||||=  '''{resource}_version_prop''' ||
     60||= id ||= prop ||= value ||= seq ||
     61|| int || string || bigint || bigint ||
     62|-----------------------------------------------
     63||||||||=  '''{resource}_version_prop_string''' ||
     64||= id ||= prop ||= value ||= seq ||
     65|| int || string || string || bigint ||
     66|-----------------------------------------------
     67||||||||=  '''{resource}_version_prop_text''' ||
     68||= id ||= prop ||= value ||= seq ||
     69|| int || string || text || bigint ||
     70|-----------------------------------------------
    6171
    6272}}}
     
    6878**FIXME** add example of multivalued property
    6979
    70 ||||||||=  '''resource_prop''' ||
    71 ||= id ||= prop ||= value ||= seq ||
    72 || 0|| summary   ||Multiple Project Support|| 0||
    73 || 0||description||One day... || 0||
    74 |-----------------------------------------------
    75 ||||||||=  '''resource_revprop''' ||
    76 ||= changeid ||= revprop ||= value ||= seq ||
    77 || 2|| comment  || come on...|| 0||
    78 || 3|| comment  || sure...   || 0||
    79 |-----------------------------------------------
    80 ||||||||=  '''resource_prop_string''' ||
    81 ||= id ||= prop ||= value ||= seq ||
    82 || 0|| reporter || joe || 0||
    83 |-----------------------------------------------
    84 ||||||||=  '''resource_revprop_string''' ||
    85 ||= changeid ||= revprop ||= value ||= seq ||
    86 || 1|| author || joe    || 0||
    87 || 2|| author || joe    || 0||
    88 || 3|| author || cboos  || 0||
    89 |-----------------------------------------------
    90 ||||||||=  '''resource_prop_int''' ||
    91 ||= id ||= prop ||= value ||= seq ||
    92 || 0 || id || 130 || 0 ||
    93 |-----------------------------------------------
    94 ||||||||=  '''resource_revprop_int''' ||
    95 ||= changeid ||= revprop ||= value ||= seq ||
    96 || 1||   date   ||5 years ago|| 0||
    97 || 2||   date   ||2 years ago|| 0||
    98 || 3||   date   ||1 year ago || 0||
     80||||||||=  '''{resource}_prop''' ||
     81||= id ||= prop ||= value ||= seq ||
     82|| 0 || id || 130|| 100001||
     83|-----------------------------------------------
     84||||||||=  '''{resource}_prop_string''' ||
     85||= id ||= prop ||= value ||= seq ||
     86|| 0|| reporter || joe || 100002||
     87|-----------------------------------------------
     88||||||||=  '''{resource}_prop_text''' ||
     89||= id ||= prop ||= value ||= seq ||
     90|| 0|| summary   ||Multiple Project Support|| 100003||
     91|| 0||description||One day... || 100004||
    9992|-----------------------------------------------
    10093\\
    10194|-----------------------------------------------
    102 ||||||||=  '''resource_change''' ||
    103 ||= id ||= changeid ||= revprop ||= value ||= seq ||
    104 || 0 || 1||  summary  ||Multiple Project Support|| 0||
    105 || 0 || 1||description||Should be easy...|| 0||
    106 || 0 || 2||description||Should be easy... Redmine has it! || 0||
    107 || 0 || 3||description||One day...|| 0||
    108 |-----------------------------------------------
    109 ||||||||=  '''resource_change_string''' ||
    110 ||= id ||= changeid ||= prop ||= value ||= seq ||
    111 || 0|| 1|| reporter ||joe|| 0||
    112 |-----------------------------------------------
    113 ||||||||=  '''resource_change_int''' ||
    114 ||= id ||= changeid ||= prop ||= value ||= seq ||
    115 || 0|| 1|| id ||130||0||
     95||||||||=  '''{resource}_rev_prop''' ||
     96||= id ||= prop ||= value ||= seq ||
     97|| 11||   resource   || 0|| 10000010||
     98|| 11||   date   ||(5 years ago)|| 10000011||
     99|| 12||   resource   || 0|| 10000012||
     100|| 12||   date   ||(2 years ago)|| 10000013||
     101|| 13||   resource   || 0|| 10000014||
     102|| 13||   date   ||(1 year ago)|| 10000015||
     103|-----------------------------------------------
     104||||||||=  '''{resource}_revprop_string''' ||
     105||= id ||= prop ||= value ||= seq ||
     106|| 11|| author || joe    || 10000016||
     107|| 12|| author || joe    || 10000017||
     108|| 13|| author || cboos  || 10000018||
     109|-----------------------------------------------
     110||||||||=  '''{resource}_revprop_text''' ||
     111||= id ||= prop ||= value ||= seq ||
     112|| 12|| comment  || come on... || 10000019||
     113|| 13|| comment  || sure...    || 10000020||
     114|-----------------------------------------------
     115\\
     116|-----------------------------------------------
     117||||||=  '''{resource}_version''' ||
     118||= id ||= prop ||= value ||= seq ||
     119|| 21||   resource   ||  0|| 10000080||
     120|| 21||   revision   || 11|| 10000081||
     121|| 22||   resource   ||  0|| 10000082||
     122|| 22||   revision   || 12|| 10000083||
     123|| 23||   resource   ||  0|| 10000084||
     124|| 23||   revision   || 13|| 10000085||
     125|-----------------------------------------------
     126||||||=  '''{resource}_version_string''' ||
     127||= id ||= prop ||= value ||= seq ||
     128|| 21|| 1|| reporter ||joe|| 10000086||
     129|-----------------------------------------------
     130||||||=  '''{resource}_version_text''' ||
     131||= id ||= prop ||= value ||= seq ||
     132|| 21||  summary  ||Multiple Project Support|| 10000087||
     133|| 21|| description||Should be easy...|| 10000088||
     134|| 22|| description||Should be easy... Redmine has it! || 10000089||
     135|| 23|| description||One day...|| 10000090||
     136
    116137
    117138}}}
     
    123144=== About the "Schema" ===
    124145
    125  ||||||||=     '''resource_schema'''      =||
     146 ||||||||=     '''{resource}_schema'''      =||
    126147 ||= realm ||= prop ||= metaprop ||= value ||
    127148
     
    192213}}}
    193214 - And please rename the ''name'' field to ''prop'' so that it matches the one in the resource_schema table.
    194    - (cboos) done - now I use `prop` consistently to talk about resource property keys, `revprop` to talk about change property keys and `metaprop` in the schema (as those are properties of properties)
     215   - (cboos) done - now I use `prop` consistently to talk about resource property names
    195216 - Also I would like to have the resource_schema table extended so that it will support different schemas for, say, different ticket types. That way, users can define their personal ticket type schemas. Of course, derivation would also be nice, but that could be implemented at a later point in time, requiring yet another table. That way we could have both inheritance at the schema level and also multiple different models per realm ;)
    196217  {{{