SearchKit - Click-sort column headers on list page
[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>
8 <add>1.1</add>
9 <field>
8f069c03
EM
10 <name>id</name>
11 <type>int unsigned</type>
e61e47ad 12 <title>Saved Search ID</title>
8f069c03 13 <required>true</required>
e61e47ad 14 <comment>Saved Search ID</comment>
0481e12c
A
15 <html>
16 <type>Number</type>
17 </html>
8f069c03 18 <add>1.1</add>
6a488035
TO
19 </field>
20 <primaryKey>
8f069c03
EM
21 <name>id</name>
22 <autoincrement>false</autoincrement>
6a488035 23 </primaryKey>
53b13ffe
CW
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
6a488035 57 <field>
8f069c03
EM
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>
2a5c9b4d 63 <serialize>PHP</serialize>
8f069c03 64 <add>1.1</add>
6a488035 65 </field>
53b13ffe 66
6a488035 67 <field>
8f069c03
EM
68 <name>mapping_id</name>
69 <type>int unsigned</type>
e61e47ad 70 <title>Mapping ID</title>
8f069c03 71 <comment>Foreign key to civicrm_mapping used for saved search-builder searches.</comment>
57e94608
A
72 <html>
73 <label>Mapping</label>
74 </html>
8f069c03 75 <add>1.5</add>
6a488035
TO
76 </field>
77 <foreignKey>
8f069c03
EM
78 <name>mapping_id</name>
79 <table>civicrm_mapping</table>
80 <key>id</key>
f6f6476e 81 <onDelete>SET NULL</onDelete>
8f069c03 82 <add>1.5</add>
6a488035 83 </foreignKey>
53b13ffe 84
6a488035 85 <field>
8f069c03
EM
86 <name>search_custom_id</name>
87 <type>int unsigned</type>
6ffccb86 88 <title>Option Value ID</title>
8f069c03
EM
89 <comment>Foreign key to civicrm_option value table used for saved custom searches.</comment>
90 <add>2.0</add>
6a488035 91 </field>
53b13ffe 92
6a488035 93 <field>
8f069c03
EM
94 <name>where_clause</name>
95 <type>text</type>
e61e47ad 96 <title>Where Clause</title>
8f069c03
EM
97 <comment>the sql where clause if a saved search acl</comment>
98 <add>1.6</add>
f90f330b 99 <drop>5.24</drop>
6a488035 100 </field>
53b13ffe 101
6a488035 102 <field>
8f069c03
EM
103 <name>select_tables</name>
104 <type>text</type>
e61e47ad 105 <title>Select Tables</title>
8f069c03 106 <comment>the tables to be included in a select data</comment>
2a5c9b4d 107 <serialize>PHP</serialize>
8f069c03 108 <add>1.6</add>
f90f330b 109 <drop>5.24</drop>
6a488035 110 </field>
53b13ffe 111
6a488035 112 <field>
8f069c03
EM
113 <name>where_tables</name>
114 <type>text</type>
e61e47ad 115 <title>Where Tables</title>
8f069c03 116 <comment>the tables to be included in the count statement</comment>
2a5c9b4d 117 <serialize>PHP</serialize>
8f069c03 118 <add>1.6</add>
f90f330b 119 <drop>5.24</drop>
6a488035 120 </field>
53b13ffe 121
0d7216d3
CW
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>
53b13ffe 130
0d7216d3
CW
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>
49a1050c 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 <add>5.36</add>
148 </field>
149 <foreignKey>
150 <name>created_id</name>
151 <table>civicrm_contact</table>
152 <key>id</key>
153 <add>5.36</add>
154 <onDelete>SET NULL</onDelete>
155 </foreignKey>
156 <field>
157 <name>modified_id</name>
158 <type>int unsigned</type>
159 <title>Modified By Contact ID</title>
160 <comment>FK to contact table.</comment>
161 <html>
162 <label>Modified By</label>
163 </html>
a0e733f3 164 <readonly>true</readonly>
49a1050c 165 <add>5.36</add>
166 </field>
167 <foreignKey>
168 <name>modified_id</name>
169 <table>civicrm_contact</table>
170 <key>id</key>
171 <add>5.36</add>
172 <onDelete>SET NULL</onDelete>
173 </foreignKey>
174 <field>
175 <name>expires_date</name>
176 <type>timestamp</type>
177 <title>Search Expiry Date</title>
178 <required>false</required>
179 <comment>Optional date after which the search is not needed</comment>
180 <add>5.36</add>
181 </field>
e12bf0ac 182 <field>
183 <name>created_date</name>
184 <type>timestamp</type>
185 <comment>When the search was created.</comment>
186 <required>true</required>
187 <default>CURRENT_TIMESTAMP</default>
188 <add>5.36</add>
189 </field>
190 <field>
191 <name>modified_date</name>
192 <type>timestamp</type>
1901dd96 193 <comment>When the search was last modified.</comment>
e12bf0ac 194 <required>true</required>
195 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
196 <add>5.36</add>
a0e733f3 197 <readonly>true</readonly>
e12bf0ac 198 </field>
1901dd96 199 <field>
200 <name>description</name>
201 <type>text</type>
202 <title>Saved Search Description</title>
203 <html>
204 <type>TextArea</type>
205 <rows>2</rows>
206 <cols>60</cols>
207 </html>
208 <add>5.36</add>
209 </field>
6a488035 210</table>