Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2013-12-30-11-03-32
[civicrm-core.git] / xml / schema / Campaign / Survey.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Campaign</base>
4 <class>Survey</class>
5 <name>civicrm_survey</name>
6 <comment>Campaign Survey Details.</comment>
7 <add>3.2</add>
8
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>Survey id.</comment>
14 <add>3.3</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20
21 <field>
22 <name>title</name>
23 <title>Survey Title</title>
24 <type>varchar</type>
25 <length>255</length>
26 <required>true</required>
27 <comment>Title of the Survey.</comment>
28 <import>true</import>
29 <add>3.3</add>
30 </field>
31
32 <field>
33 <name>campaign_id</name>
34 <type>int unsigned</type>
35 <default>NULL</default>
36 <comment>Foreign key to the Campaign.</comment>
37 <pseudoconstant>
38 <table>civicrm_campaign</table>
39 <keyColumn>id</keyColumn>
40 <labelColumn>title</labelColumn>
41 <condition>(end_date IS NULL OR end_date > NOW())</condition>
42 </pseudoconstant>
43 <add>3.3</add>
44 </field>
45 <foreignKey>
46 <name>campaign_id</name>
47 <table>civicrm_campaign</table>
48 <key>id</key>
49 <add>3.3</add>
50 <onDelete>SET NULL</onDelete>
51 </foreignKey>
52
53 <field>
54 <name>activity_type_id</name>
55 <title>Activity Type ID</title>
56 <type>int unsigned</type>
57 <default>NULL</default>
58 <comment>Implicit FK to civicrm_option_value where option_group = activity_type</comment>
59 <import>true</import>
60 <add>3.3</add>
61 <pseudoconstant>
62 <optionGroupName>activity_type</optionGroupName>
63 </pseudoconstant>
64 <html>
65 <type>Select</type>
66 </html>
67 </field>
68 <index>
69 <name>UI_activity_type_id</name>
70 <fieldName>activity_type_id</fieldName>
71 <add>3.3</add>
72 </index>
73
74 <field>
75 <name>recontact_interval</name>
76 <type>text</type>
77 <comment>Recontact intervals for each status.</comment>
78 <html>
79 <type>TextArea</type>
80 <rows>20</rows>
81 <cols>80</cols>
82 </html>
83 <add>3.3</add>
84 </field>
85
86 <field>
87 <name>instructions</name>
88 <type>text</type>
89 <comment>Script instructions for volunteers to use for the survey.</comment>
90 <html>
91 <type>TextArea</type>
92 <rows>20</rows>
93 <cols>80</cols>
94 </html>
95 <add>3.3</add>
96 </field>
97
98 <field>
99 <name>release_frequency</name>
100 <type>int unsigned</type>
101 <default>NULL</default>
102 <comment>Number of days for recurrence of release.</comment>
103 <add>3.3</add>
104 </field>
105
106 <field>
107 <name>max_number_of_contacts</name>
108 <title>Maximum number of contacts</title>
109 <type>int unsigned</type>
110 <default>NULL</default>
111 <comment>Maximum number of contacts to allow for survey.</comment>
112 <add>3.3</add>
113 </field>
114
115 <field>
116 <name>default_number_of_contacts</name>
117 <title>Default number of contacts</title>
118 <type>int unsigned</type>
119 <default>NULL</default>
120 <comment>Default number of contacts to allow for survey.</comment>
121 <add>3.3</add>
122 </field>
123
124 <field>
125 <name>is_active</name>
126 <type>boolean</type>
127 <default>1</default>
128 <comment>Is this survey enabled or disabled/cancelled?</comment>
129 <add>3.3</add>
130 </field>
131
132 <field>
133 <name>is_default</name>
134 <type>boolean</type>
135 <default>0</default>
136 <comment>Is this default survey?</comment>
137 <add>3.3</add>
138 </field>
139
140 <field>
141 <name>created_id</name>
142 <type>int unsigned</type>
143 <comment>FK to civicrm_contact, who created this Survey.</comment>
144 <add>3.3</add>
145 </field>
146 <foreignKey>
147 <name>created_id</name>
148 <table>civicrm_contact</table>
149 <key>id</key>
150 <add>3.3</add>
151 <onDelete>SET NULL</onDelete>
152 </foreignKey>
153
154 <field>
155 <name>created_date</name>
156 <type>datetime</type>
157 <title>Campaign Created Date</title>
158 <comment>Date and time that Survey was created.</comment>
159 <add>3.3</add>
160 </field>
161
162 <field>
163 <name>last_modified_id</name>
164 <type>int unsigned</type>
165 <comment>FK to civicrm_contact, who recently edited this Survey.</comment>
166 <add>3.3</add>
167 </field>
168 <foreignKey>
169 <name>last_modified_id</name>
170 <table>civicrm_contact</table>
171 <key>id</key>
172 <add>3.3</add>
173 <onDelete>SET NULL</onDelete>
174 </foreignKey>
175
176 <field>
177 <name>last_modified_date</name>
178 <type>datetime</type>
179 <comment>Date and time that Survey was edited last time.</comment>
180 <add>3.3</add>
181 </field>
182
183 <field>
184 <name>result_id</name>
185 <type>int unsigned</type>
186 <default>NULL</default>
187 <comment>Used to store option group id.</comment>
188 <add>3.3</add>
189 </field>
190 <field>
191 <name>bypass_confirm</name>
192 <type>boolean</type>
193 <default>0</default>
194 <comment>Bypass the email verification.</comment>
195 <add>4.2</add>
196 </field>
197 <field>
198 <name>thankyou_title</name>
199 <title>Thank-you Title</title>
200 <type>varchar</type>
201 <length>255</length>
202 <localizable>true</localizable>
203 <comment>Title for Thank-you page (header title tag, and display at the top of the page).</comment>
204 <add>4.2</add>
205 </field>
206 <field>
207 <name>thankyou_text</name>
208 <title>Thank-you Text</title>
209 <type>text</type>
210 <html>
211 <type>TextArea</type>
212 <rows>8</rows>
213 <cols>60</cols>
214 </html>
215 <localizable>true</localizable>
216 <comment>text and html allowed. displayed above result on success page</comment>
217 <add>4.2</add>
218 </field>
219 <field>
220 <name>is_share</name>
221 <title>Is shared through social media</title>
222 <type>boolean</type>
223 <default>1</default>
224 <comment>Can people share the petition through social media?</comment>
225 <add>4.4</add>
226 </field>
227 </table>