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