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