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