CRM-13497 - getting there on main tables
[civicrm-core.git] / xml / schema / Case / Case.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2<table>
3 <base>CRM/Case</base>
4 <class>Case</class>
5 <name>civicrm_case</name>
6 <comment>This table stores information about cases grouping activities.</comment>
7 <add>1.8</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <uniqueName>case_id</uniqueName>
13 <required>true</required>
3c7d2158 14 <import>true</import>
6a488035
TO
15 <title>Case ID</title>
16 <comment>Unique Case ID</comment>
17 <add>1.8</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>contact_id</name>
25 <type>int unsigned</type>
26 <uniqueName>case_contact_id</uniqueName>
27 <required>true</required>
28 <comment>Contact ID of contact record given case belongs to.</comment>
29 <add>1.8</add>
30 <drop>2.1</drop>
31 </field>
32 <foreignKey>
33 <name>contact_id</name>
34 <table>civicrm_contact</table>
35 <key>id</key>
36 <add>1.8</add>
3c7d2158 37 <drop>2.1</drop>
6a488035 38 <onDelete>CASCADE</onDelete>
3c7d2158 39 </foreignKey>
6a488035
TO
40 <field>
41 <name>case_type_id</name>
42 <type>varchar</type>
43 <length>128</length>
44 <required>true</required>
45 <import>true</import>
46 <export>false</export>
47 <title>Case Type Id</title>
3f3a3ba0
CW
48 <comment>Multivalued pseudo-fk to option_value table where option_group_name = case_type.</comment>
49 <pseudoconstant>
50 <optionGroupName>case_type</optionGroupName>
51 </pseudoconstant>
614d72ec 52 <html>
53 <type>Select></type>
54 </html>
6a488035
TO
55 <add>2.0</add>
56 </field>
57 <index>
58 <name>index_case_type_id</name>
59 <fieldName>case_type_id</fieldName>
60 <add>2.0</add>
61 </index>
62 <field>
63 <name>casetag1_id</name>
64 <type>varchar</type>
65 <length>128</length>
66 <required>true</required>
67 <comment>Id of first case category.</comment>
68 <add>1.8</add>
69 <drop>2.0</drop>
70 </field>
71 <index>
72 <name>index_casetag1_id</name>
73 <fieldName>casetag1_id</fieldName>
74 <add>1.8</add>
75 <drop>2.0</drop>
76 </index>
77 <field>
78 <name>casetag2_id</name>
79 <type>varchar</type>
80 <length>128</length>
81 <required>true</required>
82 <comment>Id of second case category.</comment>
83 <add>1.8</add>
3c7d2158 84 <drop>2.0</drop>
6a488035
TO
85 </field>
86 <index>
87 <name>index_casetag2_id</name>
88 <fieldName>casetag2_id</fieldName>
89 <add>1.8</add>
90 <drop>2.0</drop>
91 </index>
92 <field>
93 <name>casetag3_id</name>
94 <type>varchar</type>
95 <length>128</length>
96 <required>true</required>
97 <comment>Id of third case category.</comment>
98 <add>1.8</add>
99 <drop>2.0</drop>
100 </field>
101 <index>
102 <name>index_casetag3_id</name>
103 <fieldName>casetag3_id</fieldName>
104 <add>1.8</add>
105 <drop>2.0</drop>
106 </index>
107 <field>
108 <name>subject</name>
109 <type>varchar</type>
110 <length>128</length>
111 <title>Case Subject</title>
112 <import>true</import>
113 <uniqueName>case_subject</uniqueName>
114 <comment>Short name of the case.</comment>
614d72ec 115 <html>
116 <type>Text</type>
117 </html>
118 <add>1.8</add>
6a488035
TO
119 </field>
120 <field>
121 <name>start_date</name>
122 <uniqueName>case_start_date</uniqueName>
123 <title>Case Start Date</title>
124 <import>true</import>
125 <type>date</type>
126 <comment>Date on which given case starts.</comment>
614d72ec 127 <html>
128 <type>Select Date</type>
129 </html>
6a488035
TO
130 <add>1.8</add>
131 </field>
132 <field>
133 <name>end_date</name>
134 <uniqueName>case_end_date</uniqueName>
135 <title>Case End Date</title>
3c7d2158 136 <import>true</import>
6a488035
TO
137 <type>date</type>
138 <comment>Date on which given case ends.</comment>
614d72ec 139 <html>
140 <type>Select Date</type>
141 </html>
6a488035
TO
142 <add>1.8</add>
143 </field>
144 <field>
145 <name>details</name>
146 <type>text</type>
7deea513 147 <html>
148 <type>TextArea</type>
817807ab 149 <rows>8</rows>
150 <cols>60</cols>
7deea513 151 </html>
6a488035
TO
152 <comment>Details about the meeting (agenda, notes, etc).</comment>
153 <add>1.8</add>
154 </field>
155 <field>
156 <name>status_id</name>
157 <type>int unsigned</type>
158 <uniqueName>case_status_id</uniqueName>
159 <required>true</required>
160 <import>true</import>
161 <export>false</export>
162 <title>Case Status Id</title>
163 <comment>Id of case status.</comment>
3f3a3ba0
CW
164 <pseudoconstant>
165 <optionGroupName>case_status</optionGroupName>
166 </pseudoconstant>
614d72ec 167 <html>
168 <type>Select></type>
169 </html>
6a488035
TO
170 <add>1.8</add>
171 </field>
172 <field>
173 <name>is_deleted</name>
174 <title>Case is in the Trash</title>
175 <uniqueName>case_deleted</uniqueName>
176 <type>boolean</type>
177 <default>0</default>
178 <import>true</import>
179 <title>Case Deleted</title>
180 <add>2.2</add>
181 </field>
182 <index>
183 <name>index_is_deleted</name>
184 <fieldName>is_deleted</fieldName>
185 <add>2.2</add>
3c7d2158 186 </index>
6a488035 187</table>