Merge pull request #18838 from eileenmcnaughton/vrenew
[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>
8f069c03 15 <add>1.1</add>
6a488035
TO
16 </field>
17 <primaryKey>
8f069c03
EM
18 <name>id</name>
19 <autoincrement>false</autoincrement>
6a488035 20 </primaryKey>
53b13ffe
CW
21
22 <field>
23 <name>name</name>
24 <title>Saved Search Name</title>
25 <type>varchar</type>
26 <length>255</length>
27 <default>NULL</default>
28 <comment>Unique name of saved search</comment>
29 <html>
30 <type>Text</type>
31 </html>
32 <add>1.0</add>
33 </field>
34 <index>
35 <name>UI_name</name>
36 <fieldName>name</fieldName>
37 <unique>true</unique>
38 <add>5.32</add>
39 </index>
40
41 <field>
42 <name>label</name>
43 <title>Saved Search Label</title>
44 <type>varchar</type>
45 <length>255</length>
46 <default>NULL</default>
47 <comment>Administrative label for search</comment>
48 <html>
49 <type>Text</type>
50 </html>
51 <add>5.32</add>
52 </field>
53
6a488035 54 <field>
8f069c03
EM
55 <name>form_values</name>
56 <title>Submitted Form Values</title>
57 <type>text</type>
58 <import>true</import>
59 <comment>Submitted form values for this search</comment>
2a5c9b4d 60 <serialize>PHP</serialize>
8f069c03 61 <add>1.1</add>
6a488035 62 </field>
53b13ffe 63
6a488035 64 <field>
8f069c03
EM
65 <name>mapping_id</name>
66 <type>int unsigned</type>
e61e47ad 67 <title>Mapping ID</title>
8f069c03
EM
68 <comment>Foreign key to civicrm_mapping used for saved search-builder searches.</comment>
69 <add>1.5</add>
6a488035
TO
70 </field>
71 <foreignKey>
8f069c03
EM
72 <name>mapping_id</name>
73 <table>civicrm_mapping</table>
74 <key>id</key>
f6f6476e 75 <onDelete>SET NULL</onDelete>
8f069c03 76 <add>1.5</add>
6a488035 77 </foreignKey>
53b13ffe 78
6a488035 79 <field>
8f069c03
EM
80 <name>search_custom_id</name>
81 <type>int unsigned</type>
6ffccb86 82 <title>Option Value ID</title>
8f069c03
EM
83 <comment>Foreign key to civicrm_option value table used for saved custom searches.</comment>
84 <add>2.0</add>
6a488035 85 </field>
53b13ffe 86
6a488035 87 <field>
8f069c03
EM
88 <name>where_clause</name>
89 <type>text</type>
e61e47ad 90 <title>Where Clause</title>
8f069c03
EM
91 <comment>the sql where clause if a saved search acl</comment>
92 <add>1.6</add>
f90f330b 93 <drop>5.24</drop>
6a488035 94 </field>
53b13ffe 95
6a488035 96 <field>
8f069c03
EM
97 <name>select_tables</name>
98 <type>text</type>
e61e47ad 99 <title>Select Tables</title>
8f069c03 100 <comment>the tables to be included in a select data</comment>
2a5c9b4d 101 <serialize>PHP</serialize>
8f069c03 102 <add>1.6</add>
f90f330b 103 <drop>5.24</drop>
6a488035 104 </field>
53b13ffe 105
6a488035 106 <field>
8f069c03
EM
107 <name>where_tables</name>
108 <type>text</type>
e61e47ad 109 <title>Where Tables</title>
8f069c03 110 <comment>the tables to be included in the count statement</comment>
2a5c9b4d 111 <serialize>PHP</serialize>
8f069c03 112 <add>1.6</add>
f90f330b 113 <drop>5.24</drop>
6a488035 114 </field>
53b13ffe 115
0d7216d3
CW
116 <field>
117 <name>api_entity</name>
118 <type>varchar</type>
119 <title>Entity Name</title>
120 <length>255</length>
121 <comment>Entity name for API based search</comment>
122 <add>5.24</add>
123 </field>
53b13ffe 124
0d7216d3
CW
125 <field>
126 <name>api_params</name>
127 <type>text</type>
128 <title>API Parameters</title>
129 <comment>Parameters for API based search</comment>
130 <serialize>JSON</serialize>
131 <add>5.24</add>
132 </field>
6a488035 133</table>