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