Merge pull request #233 from mlutfy/minifixes
[civicrm-core.git] / xml / schema / Financial / EntityFinancialTrxn.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Financial</base>
5 <class>EntityFinancialTrxn</class>
6 <name>civicrm_entity_financial_trxn</name>
7 <add>3.2</add>
8 <field>
9 <name>id</name>
10 <type>int unsigned</type>
11 <required>true</required>
12 <comment>ID</comment>
13 <add>3.2</add>
14 </field>
15 <primaryKey>
16 <name>id</name>
17 <autoincrement>true</autoincrement>
18 </primaryKey>
19 <field>
20 <name>entity_table</name>
21 <type>varchar</type>
22 <length>64</length>
23 <required>true</required>
24 <import>true</import>
25 <add>3.2</add>
26 <comment>May contain civicrm_order, civicrm_order_line_itme, civicrm_order_line_sub_item, civicrm_grant, civicrm_credit_adjustment</comment>
27 </field>
28 <field>
29 <name>entity_id</name>
30 <type>int unsigned</type>
31 <required>true</required>
32 <add>3.2</add>
33 </field>
34 <field>
35 <name>financial_trxn_id</name>
36 <type>int unsigned</type>
37 <add>3.2</add>
38 </field>
39 <foreignKey>
40 <name>financial_trxn_id</name>
41 <table>civicrm_financial_trxn</table>
42 <key>id</key>
43 <add>3.2</add>
44 <onDelete>SET NULL</onDelete>
45 </foreignKey>
46 <field>
47 <name>amount</name>
48 <type>decimal</type>
49 <required>true</required>
50 <import>true</import>
51 <headerPattern>/amount/i</headerPattern>
52 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
53 <comment>allocated amount of transaction to this entity</comment>
54 <add>3.2</add>
55 </field>
56 <field>
57 <name>currency</name>
58 <type>varchar</type>
59 <length>3</length>
60 <default>NULL</default>
61 <comment>3 character string, value from config setting or input via user.</comment>
62 <add>3.2</add>
63 <drop>4.3</drop>
64 </field>
65 <index>
66 <name>UI_entity_financial_trxn_entity_table</name>
67 <fieldName>entity_table</fieldName>
68 <add>4.3</add>
69 </index>
70 <index>
71 <name>UI_entity_financial_trxn_entity_id</name>
72 <fieldName>entity_id</fieldName>
73 <add>4.3</add>
74 </index>
75 </table>
76