Merge pull request #8193 from colemanw/scardinius-issue-CRM-16911
[civicrm-core.git] / xml / schema / PCP / PCPBlock.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/PCP</base>
5 <class>PCPBlock</class>
6 <name>civicrm_pcp_block</name>
7 <comment>A Personal Campaign Page Block stores admin configurable status options and rules</comment>
8 <add>2.2</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <title>PCP Block ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>PCP block Id</comment>
16 <add>2.2</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>entity_table</name>
24 <title>Entity Table</title>
25 <type>varchar</type>
26 <length>64</length>
27 <add>2.2</add>
28 </field>
29 <field>
30 <name>entity_id</name>
31 <title>Entity</title>
32 <type>int unsigned</type>
33 <required>true</required>
34 <comment>FK to civicrm_contribution_page.id OR civicrm_event.id</comment>
35 <add>2.2</add>
36 </field>
37 <dynamicForeignKey>
38 <idColumn>entity_id</idColumn>
39 <typeColumn>entity_table</typeColumn>
40 <add>2.2</add>
41 </dynamicForeignKey>
42 <foreignKey>
43 <name>entity_id</name>
44 <table>civicrm_contribution_page</table>
45 <key>id</key>
46 <add>2.2</add>
47 <drop>4.1</drop>
48 </foreignKey>
49 <field>
50 <name>target_entity_type</name>
51 <title>Target Entity</title>
52 <type>varchar</type>
53 <length>255</length>
54 <required>true</required>
55 <default>'contribute'</default>
56 <comment>The type of entity that this pcp targets</comment>
57 <add>4.1</add>
58 </field>
59 <field>
60 <name>target_entity_id</name>
61 <title>Target Entity ID</title>
62 <type>int unsigned</type>
63 <required>true</required>
64 <comment>The entity that this pcp targets</comment>
65 <add>4.1</add>
66 </field>
67 <dynamicForeignKey>
68 <idColumn>target_entity_id</idColumn>
69 <!-- FIXME: typename and not tablename? -->
70 <typeColumn>target_entity_type</typeColumn>
71 <add>4.1</add>
72 </dynamicForeignKey>
73 <field>
74 <name>supporter_profile_id</name>
75 <title>Supporter Profile</title>
76 <type>int unsigned</type>
77 <comment>FK to civicrm_uf_group.id. Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?</comment>
78 <default>NULL</default>
79 <add>2.2</add>
80 </field>
81 <foreignKey>
82 <name>supporter_profile_id</name>
83 <table>civicrm_uf_group</table>
84 <key>id</key>
85 <add>3.1</add>
86 <onDelete>SET NULL</onDelete>
87 </foreignKey>
88 <field>
89 <name>owner_notify_id</name>
90 <title>Owner Notification</title>
91 <type>int unsigned</type>
92 <default>0</default>
93 <comment>FK to civicrm_option_group with name = PCP owner notifications</comment>
94 <add>4.6</add>
95 <pseudoconstant>
96 <optionGroupName>pcp_owner_notify</optionGroupName>
97 </pseudoconstant>
98 <html>
99 <type>Radio</type>
100 </html>
101 </field>
102 <field>
103 <name>is_approval_needed</name>
104 <title>Approval Required?</title>
105 <type>boolean</type>
106 <comment>Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?</comment>
107 <default>NULL</default>
108 <add>2.2</add>
109 </field>
110 <field>
111 <name>is_tellfriend_enabled</name>
112 <title>Tell a Friend Enabled?</title>
113 <type>boolean</type>
114 <comment>Does Personal Campaign Page allow using tell a friend?</comment>
115 <default>NULL</default>
116 <add>2.2</add>
117 </field>
118 <field>
119 <name>tellfriend_limit</name>
120 <title>Tell A Friend Limit</title>
121 <type>int unsigned</type>
122 <default>NULL</default>
123 <comment>Maximum recipient fields allowed in tell a friend</comment>
124 <add>2.2</add>
125 </field>
126 <field>
127 <name>link_text</name>
128 <title>Link Text</title>
129 <type>varchar</type>
130 <length>255</length>
131 <default>NULL</default>
132 <localizable>true</localizable>
133 <comment>Link text for PCP.</comment>
134 <add>2.2</add>
135 </field>
136 <field>
137 <name>is_active</name>
138 <title>Enabled?</title>
139 <type>boolean</type>
140 <comment>Is Personal Campaign Page Block enabled/active?</comment>
141 <default>1</default>
142 <add>2.2</add>
143 </field>
144 <field>
145 <name>notify_email</name>
146 <title>Notification Email</title>
147 <type>varchar</type>
148 <length>255</length>
149 <comment>If set, notification is automatically emailed to this email-address on create/update Personal Campaign Page</comment>
150 <default>NULL</default>
151 <add>2.2</add>
152 </field>
153 </table>