Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Contact</base> | |
5 | <class>GroupContact</class> | |
6 | <name>civicrm_group_contact</name> | |
9f876c58 | 7 | <comment>Join table sets membership for 'static' groups. Also used to store 'opt-out' entries for 'query' type groups (status = 'OUT') </comment> |
6a488035 TO |
8 | <add>1.1</add> |
9 | <log>true</log> | |
10 | <field> | |
8f069c03 EM |
11 | <name>id</name> |
12 | <type>int unsigned</type> | |
13 | <title>Group Contact ID</title> | |
14 | <required>true</required> | |
15 | <comment>primary key</comment> | |
16 | <add>1.1</add> | |
6a488035 TO |
17 | </field> |
18 | <primaryKey> | |
8f069c03 EM |
19 | <name>id</name> |
20 | <autoincrement>true</autoincrement> | |
6a488035 TO |
21 | </primaryKey> |
22 | <field> | |
29494eef AS |
23 | <name>group_id</name> |
24 | <type>int unsigned</type> | |
25 | <title>Group ID</title> | |
26 | <required>true</required> | |
27 | <comment>FK to civicrm_group</comment> | |
28 | <add>1.1</add> | |
29 | <pseudoconstant> | |
30 | <table>civicrm_group</table> | |
31 | <keyColumn>id</keyColumn> | |
32 | <labelColumn>title</labelColumn> | |
33 | </pseudoconstant> | |
614d72ec | 34 | <html> |
e0991796 | 35 | <type>Select</type> |
614d72ec | 36 | </html> |
6a488035 TO |
37 | </field> |
38 | <foreignKey> | |
8f069c03 EM |
39 | <name>group_id</name> |
40 | <table>civicrm_group</table> | |
41 | <key>id</key> | |
42 | <add>1.1</add> | |
43 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
44 | </foreignKey> |
45 | <field> | |
8f069c03 EM |
46 | <name>contact_id</name> |
47 | <type>int unsigned</type> | |
48 | <title>Contact ID</title> | |
49 | <required>true</required> | |
50 | <comment>FK to civicrm_contact</comment> | |
51 | <add>1.1</add> | |
6a488035 TO |
52 | </field> |
53 | <foreignKey> | |
8f069c03 EM |
54 | <name>contact_id</name> |
55 | <table>civicrm_contact</table> | |
56 | <key>id</key> | |
57 | <add>1.1</add> | |
58 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
59 | </foreignKey> |
60 | <field> | |
8f069c03 EM |
61 | <name>status</name> |
62 | <type>varchar</type> | |
63 | <length>8</length> | |
64 | <title>Group Contact Status</title> | |
65 | <comment>status of contact relative to membership in group</comment> | |
66 | <pseudoconstant> | |
67 | <callback>CRM_Core_SelectValues::groupContactStatus</callback> | |
68 | </pseudoconstant> | |
69 | <add>1.1</add> | |
70 | <html> | |
71 | <type>Select</type> | |
72 | </html> | |
6a488035 TO |
73 | </field> |
74 | <field> | |
8f069c03 EM |
75 | <name>location_id</name> |
76 | <type>int unsigned</type> | |
77 | <title>Group Contact Location</title> | |
78 | <comment>Optional location to associate with this membership</comment> | |
79 | <add>1.1</add> | |
6a488035 TO |
80 | </field> |
81 | <foreignKey> | |
82 | <name>location_id</name> | |
83 | <table>civicrm_loc_block</table> | |
84 | <key>id</key> | |
85 | <add>1.1</add> | |
86 | <onDelete>SET NULL</onDelete> | |
87 | </foreignKey> | |
88 | <field> | |
8f069c03 EM |
89 | <name>email_id</name> |
90 | <type>int unsigned</type> | |
91 | <title>Group Contact Email</title> | |
92 | <comment>Optional email to associate with this membership</comment> | |
93 | <add>1.1</add> | |
6a488035 TO |
94 | </field> |
95 | <foreignKey> | |
96 | <name>email_id</name> | |
97 | <table>civicrm_email</table> | |
98 | <key>id</key> | |
99 | <add>1.1</add> | |
100 | </foreignKey> | |
101 | <index> | |
102 | <name>UI_contact_group</name> | |
103 | <fieldName>contact_id</fieldName> | |
104 | <fieldName>group_id</fieldName> | |
105 | <unique>true</unique> | |
106 | <add>1.6</add> | |
107 | </index> | |
108 | </table> |