Merge pull request #2191 from monishdeb/CRM-13710
[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 <add>3.3</add>
38 </field>
39 <foreignKey>
40 <name>campaign_id</name>
41 <table>civicrm_campaign</table>
42 <key>id</key>
43 <add>3.3</add>
44 <onDelete>SET NULL</onDelete>
45 </foreignKey>
46
47 <field>
48 <name>activity_type_id</name>
49 <title>Activity Type ID</title>
50 <type>int unsigned</type>
51 <default>NULL</default>
52 <comment>Implicit FK to civicrm_option_value where option_group = activity_type</comment>
53 <import>true</import>
54 <add>3.3</add>
55 <pseudoconstant>
56 <optionGroupName>activity_type</optionGroupName>
57 </pseudoconstant>
58 <html>
59 <type>Select</type>
60 </html>
61 </field>
62 <index>
63 <name>UI_activity_type_id</name>
64 <fieldName>activity_type_id</fieldName>
65 <add>3.3</add>
66 </index>
67
68 <field>
69 <name>recontact_interval</name>
70 <type>text</type>
71 <comment>Recontact intervals for each status.</comment>
72 <html>
73 <type>TextArea</type>
74 <rows>20</rows>
75 <cols>80</cols>
76 </html>
77 <add>3.3</add>
78 </field>
79
80 <field>
81 <name>instructions</name>
82 <type>text</type>
83 <comment>Script instructions for volunteers to use for the survey.</comment>
84 <html>
85 <type>TextArea</type>
86 <rows>20</rows>
87 <cols>80</cols>
88 </html>
89 <add>3.3</add>
90 </field>
91
92 <field>
93 <name>release_frequency</name>
94 <type>int unsigned</type>
95 <default>NULL</default>
96 <comment>Number of days for recurrence of release.</comment>
97 <add>3.3</add>
98 </field>
99
100 <field>
101 <name>max_number_of_contacts</name>
102 <title>Maximum number of contacts</title>
103 <type>int unsigned</type>
104 <default>NULL</default>
105 <comment>Maximum number of contacts to allow for survey.</comment>
106 <add>3.3</add>
107 </field>
108
109 <field>
110 <name>default_number_of_contacts</name>
111 <title>Default number of contacts</title>
112 <type>int unsigned</type>
113 <default>NULL</default>
114 <comment>Default number of contacts to allow for survey.</comment>
115 <add>3.3</add>
116 </field>
117
118 <field>
119 <name>is_active</name>
120 <type>boolean</type>
121 <default>1</default>
122 <comment>Is this survey enabled or disabled/cancelled?</comment>
123 <add>3.3</add>
124 </field>
125
126 <field>
127 <name>is_default</name>
128 <type>boolean</type>
129 <default>0</default>
130 <comment>Is this default survey?</comment>
131 <add>3.3</add>
132 </field>
133
134 <field>
135 <name>created_id</name>
136 <type>int unsigned</type>
137 <comment>FK to civicrm_contact, who created this Survey.</comment>
138 <add>3.3</add>
139 </field>
140 <foreignKey>
141 <name>created_id</name>
142 <table>civicrm_contact</table>
143 <key>id</key>
144 <add>3.3</add>
145 <onDelete>SET NULL</onDelete>
146 </foreignKey>
147
148 <field>
149 <name>created_date</name>
150 <type>datetime</type>
151 <title>Campaign Created Date</title>
152 <comment>Date and time that Survey was created.</comment>
153 <add>3.3</add>
154 </field>
155
156 <field>
157 <name>last_modified_id</name>
158 <type>int unsigned</type>
159 <comment>FK to civicrm_contact, who recently edited this Survey.</comment>
160 <add>3.3</add>
161 </field>
162 <foreignKey>
163 <name>last_modified_id</name>
164 <table>civicrm_contact</table>
165 <key>id</key>
166 <add>3.3</add>
167 <onDelete>SET NULL</onDelete>
168 </foreignKey>
169
170 <field>
171 <name>last_modified_date</name>
172 <type>datetime</type>
173 <comment>Date and time that Survey was edited last time.</comment>
174 <add>3.3</add>
175 </field>
176
177 <field>
178 <name>result_id</name>
179 <type>int unsigned</type>
180 <default>NULL</default>
181 <comment>Used to store option group id.</comment>
182 <add>3.3</add>
183 </field>
184 <field>
185 <name>bypass_confirm</name>
186 <type>boolean</type>
187 <default>0</default>
188 <comment>Bypass the email verification.</comment>
189 <add>4.2</add>
190 </field>
191 <field>
192 <name>thankyou_title</name>
193 <title>Thank-you Title</title>
194 <type>varchar</type>
195 <length>255</length>
196 <localizable>true</localizable>
197 <comment>Title for Thank-you page (header title tag, and display at the top of the page).</comment>
198 <add>4.2</add>
199 </field>
200 <field>
201 <name>thankyou_text</name>
202 <title>Thank-you Text</title>
203 <type>text</type>
204 <html>
205 <type>TextArea</type>
206 <rows>8</rows>
207 <cols>60</cols>
208 </html>
209 <localizable>true</localizable>
210 <comment>text and html allowed. displayed above result on success page</comment>
211 <add>4.2</add>
212 </field>
213 <field>
214 <name>is_share</name>
215 <title>Is shared through social media</title>
216 <type>boolean</type>
217 <default>1</default>
218 <comment>Can people share the petition through social media?</comment>
219 <add>4.4</add>
220 </field>
221 </table>