Merge pull request #18517 from JMAConsulting/financial-issue-150
[civicrm-core.git] / xml / schema / Contact / SavedSearch.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>SavedSearch</class>
6 <name>civicrm_saved_search</name>
7 <comment>Users can save their complex SQL queries and use them later.</comment>
8 <add>1.1</add>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <title>Saved Search ID</title>
13 <required>true</required>
14 <comment>Saved Search ID</comment>
15 <html>
16 <type>Number</type>
17 </html>
18 <add>1.1</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>false</autoincrement>
23 </primaryKey>
24
25 <field>
26 <name>name</name>
27 <title>Saved Search Name</title>
28 <type>varchar</type>
29 <length>255</length>
30 <default>NULL</default>
31 <comment>Unique name of saved search</comment>
32 <html>
33 <type>Text</type>
34 </html>
35 <add>1.0</add>
36 </field>
37 <index>
38 <name>UI_name</name>
39 <fieldName>name</fieldName>
40 <unique>true</unique>
41 <add>5.32</add>
42 </index>
43
44 <field>
45 <name>label</name>
46 <title>Saved Search Label</title>
47 <type>varchar</type>
48 <length>255</length>
49 <default>NULL</default>
50 <comment>Administrative label for search</comment>
51 <html>
52 <type>Text</type>
53 </html>
54 <add>5.32</add>
55 </field>
56
57 <field>
58 <name>form_values</name>
59 <title>Submitted Form Values</title>
60 <type>text</type>
61 <import>true</import>
62 <comment>Submitted form values for this search</comment>
63 <serialize>PHP</serialize>
64 <add>1.1</add>
65 </field>
66
67 <field>
68 <name>mapping_id</name>
69 <type>int unsigned</type>
70 <title>Mapping ID</title>
71 <comment>Foreign key to civicrm_mapping used for saved search-builder searches.</comment>
72 <html>
73 <label>Mapping</label>
74 </html>
75 <add>1.5</add>
76 </field>
77 <foreignKey>
78 <name>mapping_id</name>
79 <table>civicrm_mapping</table>
80 <key>id</key>
81 <onDelete>SET NULL</onDelete>
82 <add>1.5</add>
83 </foreignKey>
84
85 <field>
86 <name>search_custom_id</name>
87 <type>int unsigned</type>
88 <title>Option Value ID</title>
89 <comment>Foreign key to civicrm_option value table used for saved custom searches.</comment>
90 <add>2.0</add>
91 </field>
92
93 <field>
94 <name>where_clause</name>
95 <type>text</type>
96 <title>Where Clause</title>
97 <comment>the sql where clause if a saved search acl</comment>
98 <add>1.6</add>
99 <drop>5.24</drop>
100 </field>
101
102 <field>
103 <name>select_tables</name>
104 <type>text</type>
105 <title>Select Tables</title>
106 <comment>the tables to be included in a select data</comment>
107 <serialize>PHP</serialize>
108 <add>1.6</add>
109 <drop>5.24</drop>
110 </field>
111
112 <field>
113 <name>where_tables</name>
114 <type>text</type>
115 <title>Where Tables</title>
116 <comment>the tables to be included in the count statement</comment>
117 <serialize>PHP</serialize>
118 <add>1.6</add>
119 <drop>5.24</drop>
120 </field>
121
122 <field>
123 <name>api_entity</name>
124 <type>varchar</type>
125 <title>Entity Name</title>
126 <length>255</length>
127 <comment>Entity name for API based search</comment>
128 <add>5.24</add>
129 </field>
130
131 <field>
132 <name>api_params</name>
133 <type>text</type>
134 <title>API Parameters</title>
135 <comment>Parameters for API based search</comment>
136 <serialize>JSON</serialize>
137 <add>5.24</add>
138 </field>
139 <field>
140 <name>created_id</name>
141 <type>int unsigned</type>
142 <title>Created By Contact ID</title>
143 <comment>FK to contact table.</comment>
144 <html>
145 <label>Created By</label>
146 </html>
147 <readonly>true</readonly>
148 <add>5.36</add>
149 </field>
150 <foreignKey>
151 <name>created_id</name>
152 <table>civicrm_contact</table>
153 <key>id</key>
154 <add>5.36</add>
155 <onDelete>SET NULL</onDelete>
156 </foreignKey>
157 <field>
158 <name>modified_id</name>
159 <type>int unsigned</type>
160 <title>Modified By Contact ID</title>
161 <comment>FK to contact table.</comment>
162 <html>
163 <label>Modified By</label>
164 </html>
165 <readonly>true</readonly>
166 <add>5.36</add>
167 </field>
168 <foreignKey>
169 <name>modified_id</name>
170 <table>civicrm_contact</table>
171 <key>id</key>
172 <add>5.36</add>
173 <onDelete>SET NULL</onDelete>
174 </foreignKey>
175 <field>
176 <name>expires_date</name>
177 <type>timestamp</type>
178 <title>Search Expiry Date</title>
179 <required>false</required>
180 <comment>Optional date after which the search is not needed</comment>
181 <add>5.36</add>
182 </field>
183 <field>
184 <name>created_date</name>
185 <type>timestamp</type>
186 <comment>When the search was created.</comment>
187 <required>true</required>
188 <default>CURRENT_TIMESTAMP</default>
189 <readonly>true</readonly>
190 <add>5.36</add>
191 </field>
192 <field>
193 <name>modified_date</name>
194 <type>timestamp</type>
195 <comment>When the search was last modified.</comment>
196 <required>true</required>
197 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
198 <add>5.36</add>
199 <readonly>true</readonly>
200 </field>
201 <field>
202 <name>description</name>
203 <type>text</type>
204 <title>Saved Search Description</title>
205 <html>
206 <type>TextArea</type>
207 <rows>2</rows>
208 <cols>60</cols>
209 </html>
210 <add>5.36</add>
211 </field>
212 </table>