Revert "Schema - Fix boolean fields in various tables"
[civicrm-core.git] / xml / schema / Contact / GroupContact.xml
CommitLineData
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>
57e94608 39 <label>Group</label>
614d72ec 40 </html>
6a488035
TO
41 </field>
42 <foreignKey>
8f069c03
EM
43 <name>group_id</name>
44 <table>civicrm_group</table>
45 <key>id</key>
46 <add>1.1</add>
47 <onDelete>CASCADE</onDelete>
6a488035
TO
48 </foreignKey>
49 <field>
8f069c03
EM
50 <name>contact_id</name>
51 <type>int unsigned</type>
52 <title>Contact ID</title>
53 <required>true</required>
54 <comment>FK to civicrm_contact</comment>
57e94608
A
55 <html>
56 <label>Contact</label>
57 </html>
8f069c03 58 <add>1.1</add>
6a488035
TO
59 </field>
60 <foreignKey>
8f069c03
EM
61 <name>contact_id</name>
62 <table>civicrm_contact</table>
63 <key>id</key>
64 <add>1.1</add>
65 <onDelete>CASCADE</onDelete>
6a488035
TO
66 </foreignKey>
67 <field>
8f069c03
EM
68 <name>status</name>
69 <type>varchar</type>
70 <length>8</length>
71 <title>Group Contact Status</title>
72 <comment>status of contact relative to membership in group</comment>
73 <pseudoconstant>
74 <callback>CRM_Core_SelectValues::groupContactStatus</callback>
75 </pseudoconstant>
76 <add>1.1</add>
77 <html>
78 <type>Select</type>
79 </html>
6a488035
TO
80 </field>
81 <field>
8f069c03
EM
82 <name>location_id</name>
83 <type>int unsigned</type>
047c5009 84 <title>Location ID</title>
8f069c03 85 <comment>Optional location to associate with this membership</comment>
57e94608 86 <html>
047c5009 87 <label>Location</label>
57e94608 88 </html>
8f069c03 89 <add>1.1</add>
6a488035
TO
90 </field>
91 <foreignKey>
92 <name>location_id</name>
93 <table>civicrm_loc_block</table>
94 <key>id</key>
95 <add>1.1</add>
96 <onDelete>SET NULL</onDelete>
97 </foreignKey>
98 <field>
8f069c03
EM
99 <name>email_id</name>
100 <type>int unsigned</type>
047c5009 101 <title>Email ID</title>
8f069c03 102 <comment>Optional email to associate with this membership</comment>
57e94608 103 <html>
047c5009 104 <label>Email</label>
57e94608 105 </html>
8f069c03 106 <add>1.1</add>
6a488035
TO
107 </field>
108 <foreignKey>
109 <name>email_id</name>
110 <table>civicrm_email</table>
111 <key>id</key>
112 <add>1.1</add>
113 </foreignKey>
114 <index>
115 <name>UI_contact_group</name>
116 <fieldName>contact_id</fieldName>
117 <fieldName>group_id</fieldName>
118 <unique>true</unique>
119 <add>1.6</add>
120 </index>
121</table>