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> | |
0481e12c A |
16 | <html> |
17 | <type>Number</type> | |
18 | </html> | |
8f069c03 | 19 | <add>1.1</add> |
6a488035 TO |
20 | </field> |
21 | <primaryKey> | |
8f069c03 EM |
22 | <name>id</name> |
23 | <autoincrement>true</autoincrement> | |
6a488035 TO |
24 | </primaryKey> |
25 | <field> | |
29494eef AS |
26 | <name>group_id</name> |
27 | <type>int unsigned</type> | |
28 | <title>Group ID</title> | |
29 | <required>true</required> | |
30 | <comment>FK to civicrm_group</comment> | |
31 | <add>1.1</add> | |
32 | <pseudoconstant> | |
33 | <table>civicrm_group</table> | |
34 | <keyColumn>id</keyColumn> | |
35 | <labelColumn>title</labelColumn> | |
36 | </pseudoconstant> | |
614d72ec | 37 | <html> |
e0991796 | 38 | <type>Select</type> |
614d72ec | 39 | </html> |
6a488035 TO |
40 | </field> |
41 | <foreignKey> | |
8f069c03 EM |
42 | <name>group_id</name> |
43 | <table>civicrm_group</table> | |
44 | <key>id</key> | |
45 | <add>1.1</add> | |
46 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
47 | </foreignKey> |
48 | <field> | |
8f069c03 EM |
49 | <name>contact_id</name> |
50 | <type>int unsigned</type> | |
51 | <title>Contact ID</title> | |
52 | <required>true</required> | |
53 | <comment>FK to civicrm_contact</comment> | |
54 | <add>1.1</add> | |
6a488035 TO |
55 | </field> |
56 | <foreignKey> | |
8f069c03 EM |
57 | <name>contact_id</name> |
58 | <table>civicrm_contact</table> | |
59 | <key>id</key> | |
60 | <add>1.1</add> | |
61 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
62 | </foreignKey> |
63 | <field> | |
8f069c03 EM |
64 | <name>status</name> |
65 | <type>varchar</type> | |
66 | <length>8</length> | |
67 | <title>Group Contact Status</title> | |
68 | <comment>status of contact relative to membership in group</comment> | |
69 | <pseudoconstant> | |
70 | <callback>CRM_Core_SelectValues::groupContactStatus</callback> | |
71 | </pseudoconstant> | |
72 | <add>1.1</add> | |
73 | <html> | |
74 | <type>Select</type> | |
75 | </html> | |
6a488035 TO |
76 | </field> |
77 | <field> | |
8f069c03 EM |
78 | <name>location_id</name> |
79 | <type>int unsigned</type> | |
80 | <title>Group Contact Location</title> | |
81 | <comment>Optional location to associate with this membership</comment> | |
82 | <add>1.1</add> | |
6a488035 TO |
83 | </field> |
84 | <foreignKey> | |
85 | <name>location_id</name> | |
86 | <table>civicrm_loc_block</table> | |
87 | <key>id</key> | |
88 | <add>1.1</add> | |
89 | <onDelete>SET NULL</onDelete> | |
90 | </foreignKey> | |
91 | <field> | |
8f069c03 EM |
92 | <name>email_id</name> |
93 | <type>int unsigned</type> | |
94 | <title>Group Contact Email</title> | |
95 | <comment>Optional email to associate with this membership</comment> | |
96 | <add>1.1</add> | |
6a488035 TO |
97 | </field> |
98 | <foreignKey> | |
99 | <name>email_id</name> | |
100 | <table>civicrm_email</table> | |
101 | <key>id</key> | |
102 | <add>1.1</add> | |
103 | </foreignKey> | |
104 | <index> | |
105 | <name>UI_contact_group</name> | |
106 | <fieldName>contact_id</fieldName> | |
107 | <fieldName>group_id</fieldName> | |
108 | <unique>true</unique> | |
109 | <add>1.6</add> | |
110 | </index> | |
111 | </table> |