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"> |
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') |
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$') |