| 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 | <title>Entity Financial Transaction ID</title> |
| 11 | <type>int unsigned</type> |
| 12 | <required>true</required> |
| 13 | <comment>ID</comment> |
| 14 | <add>3.2</add> |
| 15 | </field> |
| 16 | <primaryKey> |
| 17 | <name>id</name> |
| 18 | <autoincrement>true</autoincrement> |
| 19 | </primaryKey> |
| 20 | <field> |
| 21 | <name>entity_table</name> |
| 22 | <title>Entity Table</title> |
| 23 | <type>varchar</type> |
| 24 | <length>64</length> |
| 25 | <required>true</required> |
| 26 | <import>true</import> |
| 27 | <add>3.2</add> |
| 28 | <comment>May contain civicrm_financial_item, civicrm_contribution, civicrm_financial_trxn, civicrm_grant, etc</comment> |
| 29 | </field> |
| 30 | <field> |
| 31 | <name>entity_id</name> |
| 32 | <title>Entity ID</title> |
| 33 | <type>int unsigned</type> |
| 34 | <required>true</required> |
| 35 | <add>3.2</add> |
| 36 | </field> |
| 37 | <dynamicForeignKey> |
| 38 | <idColumn>entity_id</idColumn> |
| 39 | <typeColumn>entity_table</typeColumn> |
| 40 | <add>3.2</add> |
| 41 | </dynamicForeignKey> |
| 42 | <field> |
| 43 | <name>financial_trxn_id</name> |
| 44 | <title>Financial Transaction Id</title> |
| 45 | <type>int unsigned</type> |
| 46 | <add>3.2</add> |
| 47 | </field> |
| 48 | <foreignKey> |
| 49 | <name>financial_trxn_id</name> |
| 50 | <table>civicrm_financial_trxn</table> |
| 51 | <key>id</key> |
| 52 | <add>3.2</add> |
| 53 | <onDelete>SET NULL</onDelete> |
| 54 | </foreignKey> |
| 55 | <field> |
| 56 | <name>amount</name> |
| 57 | <title>Amount</title> |
| 58 | <type>decimal</type> |
| 59 | <required>true</required> |
| 60 | <import>true</import> |
| 61 | <headerPattern>/amount/i</headerPattern> |
| 62 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> |
| 63 | <comment>allocated amount of transaction to this entity</comment> |
| 64 | <add>3.2</add> |
| 65 | </field> |
| 66 | <field> |
| 67 | <name>currency</name> |
| 68 | <type>varchar</type> |
| 69 | <length>3</length> |
| 70 | <default>NULL</default> |
| 71 | <comment>3 character string, value from config setting or input via user.</comment> |
| 72 | <add>3.2</add> |
| 73 | <drop>4.3</drop> |
| 74 | </field> |
| 75 | <index> |
| 76 | <name>UI_entity_financial_trxn_entity_table</name> |
| 77 | <fieldName>entity_table</fieldName> |
| 78 | <add>4.3</add> |
| 79 | </index> |
| 80 | <index> |
| 81 | <name>UI_entity_financial_trxn_entity_id</name> |
| 82 | <fieldName>entity_id</fieldName> |
| 83 | <add>4.3</add> |
| 84 | </index> |
| 85 | </table> |
| 86 | |