/[papo]/papo/xot/PAPO-ER.xot
ViewVC logotype

Diff of /papo/xot/PAPO-ER.xot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mhepp, Tue Aug 26 18:43:41 2003 UTC revision 1.3 by jlenton, Wed Sep 3 21:41:38 2003 UTC
# Line 3450  Line 3450 
3450        </hooks>        </hooks>
3451        <doc><![CDATA[ticket_type]]></doc>        <doc><![CDATA[ticket_type]]></doc>
3452      </table>      </table>
3453        <table name="__papo_patches_">
3454          <fields>
3455            <field name="patch" type="varchar(255)"/>
3456            <field name="date" type="timestamp" default="now()">
3457            </field>
3458          </fields>
3459          <indexes>
3460            <index type="primary_key">
3461              <index_field name="patch"/>
3462            </index>
3463          </indexes>
3464        </table>
3465        <table name="__papo__">
3466          <fields>
3467            <field name="key" type="varchar(255)"/>
3468            <field name="value" type="varchar(255)"/>
3469            <field name="date" type="timestamp" default="now()">
3470            </field>
3471          </fields>
3472          <indexes>
3473            <index type="primary_key">
3474              <index_field name="key"/>
3475            </index>
3476          </indexes>
3477        </table>
3478    </tables>    </tables>
3479    <hook_defs>    <hook_defs>
3480      <hook_def name="account">      <hook_def name="account">
# Line 3484  fields = self.xpathEval('fields')[0] Line 3509  fields = self.xpathEval('fields')[0]
3509  id = fields.xpathEval('field[@name="id"]')[0]  id = fields.xpathEval('field[@name="id"]')[0]
3510  type = id.prop('type')  type = id.prop('type')
3511    
3512  addChunk(fields, '<field name="%s" references="%s"/>' % ('_table', name))  addChunk(fields, '<field name="%s" references="%s" null="false"/>' % ('_table', name))
3513  addChunk(fields, '<field name="_start_t" type="timestamp"/>')  addChunk(fields, '<field name="_start_t" type="timestamp" null="false"/>')
3514  addChunk(fields, '<field name="_end_t" type="timestamp"/>')  addChunk(fields, '<field name="_end_t" type="timestamp"/>')
3515  self.setProp('name', "_%s_data" % name)  self.setProp('name', "_%s_data" % name)
3516  id.setProp('type', 'bigint')  id.setProp('type', 'bigint')
# Line 3502  addChunk(self.parent, ''' Line 3527  addChunk(self.parent, '''
3527    </indexes>    </indexes>
3528  </table>''' % (name, type))  </table>''' % (name, type))
3529     ]]></hook_impl>     ]]></hook_impl>
3530        <hook_impl lang="python" target="ref"><![CDATA[        <hook_impl target="ref"><![CDATA[
3531    
3532  import re  import re
3533  is_data = re.compile('_\w+_data$')  is_data = re.compile('_\w+_data$')

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26