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