Add serialize metadata to domain.locales field
[civicrm-core.git] / xml / schema / Case / Case.xml
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 <icon>fa-folder-open</icon>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <uniqueName>case_id</uniqueName>
14 <required>true</required>
15 <import>true</import>
16 <title>Case ID</title>
17 <comment>Unique Case ID</comment>
18 <html>
19 <type>Text</type>
20 </html>
21 <add>1.8</add>
22 </field>
23 <primaryKey>
24 <name>id</name>
25 <autoincrement>true</autoincrement>
26 </primaryKey>
27 <field>
28 <name>contact_id</name>
29 <type>int unsigned</type>
30 <uniqueName>case_contact_id</uniqueName>
31 <required>true</required>
32 <comment>Contact ID of contact record given case belongs to.</comment>
33 <add>1.8</add>
34 <drop>2.1</drop>
35 </field>
36 <foreignKey>
37 <name>contact_id</name>
38 <table>civicrm_contact</table>
39 <key>id</key>
40 <add>1.8</add>
41 <drop>2.1</drop>
42 <onDelete>CASCADE</onDelete>
43 </foreignKey>
44 <field>
45 <name>case_type_id</name>
46 <type>int unsigned</type>
47 <import>true</import>
48 <export>false</export>
49 <title>Case Type</title>
50 <required>true</required>
51 <comment>FK to civicrm_case_type.id</comment>
52 <html>
53 <type>Select</type>
54 </html>
55 <pseudoconstant>
56 <table>civicrm_case_type</table>
57 <keyColumn>id</keyColumn>
58 <labelColumn>title</labelColumn>
59 </pseudoconstant>
60 <add>2.0</add>
61 </field>
62 <index>
63 <name>index_case_type_id</name>
64 <fieldName>case_type_id</fieldName>
65 <add>2.0</add>
66 </index>
67 <foreignKey>
68 <name>case_type_id</name>
69 <table>civicrm_case_type</table>
70 <key>id</key>
71 <add>4.5</add>
72 </foreignKey>
73 <field>
74 <name>casetag1_id</name>
75 <type>varchar</type>
76 <length>128</length>
77 <required>true</required>
78 <comment>Id of first case category.</comment>
79 <add>1.8</add>
80 <drop>2.0</drop>
81 </field>
82 <index>
83 <name>index_casetag1_id</name>
84 <fieldName>casetag1_id</fieldName>
85 <add>1.8</add>
86 <drop>2.0</drop>
87 </index>
88 <field>
89 <name>casetag2_id</name>
90 <type>varchar</type>
91 <length>128</length>
92 <required>true</required>
93 <comment>Id of second case category.</comment>
94 <add>1.8</add>
95 <drop>2.0</drop>
96 </field>
97 <index>
98 <name>index_casetag2_id</name>
99 <fieldName>casetag2_id</fieldName>
100 <add>1.8</add>
101 <drop>2.0</drop>
102 </index>
103 <field>
104 <name>casetag3_id</name>
105 <type>varchar</type>
106 <length>128</length>
107 <required>true</required>
108 <comment>Id of third case category.</comment>
109 <add>1.8</add>
110 <drop>2.0</drop>
111 </field>
112 <index>
113 <name>index_casetag3_id</name>
114 <fieldName>casetag3_id</fieldName>
115 <add>1.8</add>
116 <drop>2.0</drop>
117 </index>
118 <field>
119 <name>subject</name>
120 <type>varchar</type>
121 <length>128</length>
122 <title>Case Subject</title>
123 <import>true</import>
124 <uniqueName>case_subject</uniqueName>
125 <comment>Short name of the case.</comment>
126 <html>
127 <type>Text</type>
128 </html>
129 <add>1.8</add>
130 </field>
131 <field>
132 <name>start_date</name>
133 <uniqueName>case_start_date</uniqueName>
134 <title>Case Start Date</title>
135 <import>true</import>
136 <type>date</type>
137 <comment>Date on which given case starts.</comment>
138 <html>
139 <type>Select Date</type>
140 <formatType>activityDateTime</formatType>
141 </html>
142 <add>1.8</add>
143 </field>
144 <field>
145 <name>end_date</name>
146 <uniqueName>case_end_date</uniqueName>
147 <title>Case End Date</title>
148 <import>true</import>
149 <type>date</type>
150 <comment>Date on which given case ends.</comment>
151 <html>
152 <type>Select Date</type>
153 <formatType>activityDateTime</formatType>
154 </html>
155 <add>1.8</add>
156 </field>
157 <field>
158 <name>details</name>
159 <type>text</type>
160 <html>
161 <type>TextArea</type>
162 <rows>8</rows>
163 <cols>60</cols>
164 </html>
165 <comment>Details populated from Open Case. Only used in the CiviCase extension.</comment>
166 <add>1.8</add>
167 </field>
168 <field>
169 <name>status_id</name>
170 <type>int unsigned</type>
171 <uniqueName>case_status_id</uniqueName>
172 <required>true</required>
173 <import>true</import>
174 <export>false</export>
175 <title>Case Status</title>
176 <comment>Id of case status.</comment>
177 <pseudoconstant>
178 <optionGroupName>case_status</optionGroupName>
179 </pseudoconstant>
180 <html>
181 <type>Select</type>
182 </html>
183 <add>1.8</add>
184 </field>
185 <field>
186 <name>is_deleted</name>
187 <title>Case is in the Trash</title>
188 <uniqueName>case_deleted</uniqueName>
189 <type>boolean</type>
190 <default>0</default>
191 <import>true</import>
192 <title>Case Deleted</title>
193 <html>
194 <type>CheckBox</type>
195 </html>
196 <add>2.2</add>
197 </field>
198 <index>
199 <name>index_is_deleted</name>
200 <fieldName>is_deleted</fieldName>
201 <add>2.2</add>
202 </index>
203 <field>
204 <name>created_date</name>
205 <uniqueName>case_created_date</uniqueName>
206 <type>timestamp</type>
207 <comment>When was the case was created.</comment>
208 <required>false</required>
209 <export>true</export>
210 <default>NULL</default>
211 <add>4.7</add>
212 </field>
213 <field>
214 <name>modified_date</name>
215 <uniqueName>case_modified_date</uniqueName>
216 <type>timestamp</type>
217 <comment>When was the case (or closely related entity) was created or modified or deleted.</comment>
218 <required>false</required>
219 <export>true</export>
220 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
221 <add>4.7</add>
222 </field>
223 </table>