Merge pull request #23296 from colemanw/afformRelationships
[civicrm-core.git] / xml / schema / Core / UFJoin.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>UFJoin</class>
6 <name>civicrm_uf_join</name>
7 <comment>User framework join table. This links various internal civicrm object with a profile. Initial use cases are the donation object and the user module</comment>
8 <add>1.3</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <title>UF Join ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Unique table ID</comment>
16 <html>
17 <type>Number</type>
18 </html>
19 <add>1.3</add>
20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
25 <field>
26 <name>is_active</name>
27 <title>Profile Use is active</title>
28 <type>boolean</type>
29 <default>1</default>
30 <required>true</required>
31 <comment>Is this join currently active?</comment>
32 <add>1.3</add>
33 </field>
34 <field>
35 <name>module</name>
36 <title>Profile Module</title>
37 <type>varchar</type>
38 <length>64</length>
39 <required>true</required>
40 <comment>Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.</comment>
41 <add>1.3</add>
42 </field>
43 <field>
44 <name>entity_table</name>
45 <title>Profile Entity Table</title>
46 <type>varchar</type>
47 <length>64</length>
48 <comment>Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.</comment>
49 <pseudoconstant>
50 <callback>CRM_Core_BAO_UFJoin::entityTables</callback>
51 </pseudoconstant>
52 <add>1.3</add>
53 </field>
54 <field>
55 <name>entity_id</name>
56 <title>Profile Entity ID</title>
57 <type>int unsigned</type>
58 <comment>Foreign key to the referenced item.</comment>
59 <add>1.3</add>
60 </field>
61 <dynamicForeignKey>
62 <idColumn>entity_id</idColumn>
63 <typeColumn>entity_table</typeColumn>
64 <add>1.3</add>
65 </dynamicForeignKey>
66 <index>
67 <name>index_entity</name>
68 <fieldName>entity_table</fieldName>
69 <fieldName>entity_id</fieldName>
70 <add>1.3</add>
71 </index>
72 <field>
73 <name>weight</name>
74 <title>Order</title>
75 <type>int</type>
76 <required>true</required>
77 <default>1</default>
78 <comment>Controls display order when multiple user framework groups are setup for concurrent display.</comment>
79 <add>1.3</add>
80 </field>
81 <field>
82 <name>uf_group_id</name>
83 <title>Profile ID</title>
84 <type>int unsigned</type>
85 <required>true</required>
86 <comment>Which form does this field belong to.</comment>
87 <add>1.3</add>
88 <pseudoconstant>
89 <table>civicrm_uf_group</table>
90 <keyColumn>id</keyColumn>
91 <labelColumn>title</labelColumn>
92 </pseudoconstant>
93 <html>
94 <type>Select</type>
95 <label>Profile</label>
96 </html>
97 </field>
98 <foreignKey>
99 <name>uf_group_id</name>
100 <table>civicrm_uf_group</table>
101 <key>id</key>
102 <add>1.3</add>
103 </foreignKey>
104 <field>
105 <name>module_data</name>
106 <title>Profile Use Data</title>
107 <type>longtext</type>
108 <comment>Json serialized array of data used by the ufjoin.module</comment>
109 <serialize>JSON</serialize>
110 <add>4.5</add>
111 </field>
112 </table>