Merge pull request #17092 from civicrm/5.25
[civicrm-core.git] / xml / schema / Batch / EntityBatch.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Batch</base>
5 <class>EntityBatch</class>
6 <name>civicrm_entity_batch</name>
7 <comment>Batch entities (Contributions, Participants, Contacts) to a batch.</comment>
8 <field>
9 <name>id</name>
10 <title>EntityBatch ID</title>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>primary key</comment>
14 <add>3.3</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>entity_table</name>
22 <title>EntityBatch Table</title>
23 <type>varchar</type>
24 <length>64</length>
25 <comment>physical tablename for entity being joined to file, e.g. civicrm_contact</comment>
26 <add>3.3</add>
27 </field>
28 <field>
29 <name>entity_id</name>
30 <title>Entity ID</title>
31 <type>int unsigned</type>
32 <required>true</required>
33 <comment>FK to entity table specified in entity_table column.</comment>
34 <add>3.3</add>
35 </field>
36 <dynamicForeignKey>
37 <idColumn>entity_id</idColumn>
38 <typeColumn>entity_table</typeColumn>
39 <add>3.3</add>
40 </dynamicForeignKey>
41 <index>
42 <name>index_entity</name>
43 <fieldName>entity_table</fieldName>
44 <fieldName>entity_id</fieldName>
45 <add>3.3</add>
46 </index>
47 <field>
48 <name>batch_id</name>
49 <title>Batch ID</title>
50 <type>int unsigned</type>
51 <required>true</required>
52 <comment>FK to civicrm_batch</comment>
53 <pseudoconstant>
54 <table>civicrm_batch</table>
55 <keyColumn>id</keyColumn>
56 <labelColumn>title</labelColumn>
57 </pseudoconstant>
58 <add>3.3</add>
59 </field>
60 <foreignKey>
61 <name>batch_id</name>
62 <table>civicrm_batch</table>
63 <key>id</key>
64 <add>3.3</add>
65 <onDelete>CASCADE</onDelete>
66 </foreignKey>
67 <index>
68 <name>UI_batch_entity</name>
69 <fieldName>batch_id</fieldName>
70 <fieldName>entity_id</fieldName>
71 <fieldName>entity_table</fieldName>
72 <unique>true</unique>
73 <add>3.3</add>
74 </index>
75 </table>