Merge pull request #21993 from mattwire/aclcachequery2
[civicrm-core.git] / xml / schema / Contribute / ContributionSoft.xml
CommitLineData
3c7d2158 1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Contribute</base>
5 <class>ContributionSoft</class>
6 <name>civicrm_contribution_soft</name>
65efffdd
ML
7 <title>Contribution Soft Credit</title>
8 <titlePlural>Contribution Soft Credits</titlePlural>
3c7d2158 9 <add>2.2</add>
6a488035 10 <log>true</log>
d31fb4e3 11 <component>CiviContribute</component>
65efffdd
ML
12 <title>Contribution Soft Credit</title>
13 <titlePlural>Contribution Soft Credits</titlePlural>
3c7d2158 14 <field>
8f069c03
EM
15 <name>id</name>
16 <uniqueName>contribution_soft_id</uniqueName>
c95977c3 17 <title>Soft Credit ID</title>
8f069c03
EM
18 <type>int unsigned</type>
19 <required>true</required>
20 <import>true</import>
c95977c3 21 <comment>Soft Credit ID</comment>
0481e12c
A
22 <html>
23 <type>Number</type>
24 </html>
8f069c03 25 <add>2.2</add>
3c7d2158 26 </field>
27 <primaryKey>
8f069c03
EM
28 <name>id</name>
29 <autoincrement>true</autoincrement>
3c7d2158 30 </primaryKey>
31 <field>
8f069c03 32 <name>contribution_id</name>
047c5009 33 <title>Contribution ID</title>
8f069c03
EM
34 <type>int unsigned</type>
35 <required>true</required>
36 <comment>FK to contribution table.</comment>
57e94608 37 <html>
047c5009 38 <label>Contribution</label>
57e94608 39 </html>
8f069c03 40 <add>2.2</add>
3c7d2158 41 </field>
42 <foreignKey>
8f069c03
EM
43 <name>contribution_id</name>
44 <table>civicrm_contribution</table>
45 <key>id</key>
46 <add>2.2</add>
47 <onDelete>CASCADE</onDelete>
6a488035 48 </foreignKey>
3c7d2158 49 <field>
8f069c03
EM
50 <name>contact_id</name>
51 <uniqueName>contribution_soft_contact_id</uniqueName>
047c5009 52 <title>Contact ID</title>
8f069c03
EM
53 <type>int unsigned</type>
54 <required>true</required>
55 <import>true</import>
56 <headerPattern>/contact(.?id)?/i</headerPattern>
57 <dataPattern>/^\d+$/</dataPattern>
58 <comment>FK to Contact ID</comment>
57e94608 59 <html>
047c5009 60 <label>Contact</label>
57e94608 61 </html>
8f069c03 62 <add>2.2</add>
3c7d2158 63 </field>
64 <foreignKey>
8f069c03
EM
65 <name>contact_id</name>
66 <table>civicrm_contact</table>
67 <key>id</key>
68 <add>2.2</add>
69 <onDelete>CASCADE</onDelete>
3c7d2158 70 </foreignKey>
71 <field>
8f069c03 72 <name>amount</name>
c95977c3 73 <title>Soft Credit Amount</title>
8f069c03
EM
74 <type>decimal</type>
75 <required>true</required>
76 <import>true</import>
77 <headerPattern>/total(.?am(ou)?nt)?/i</headerPattern>
78 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
c95977c3 79 <comment>Amount of this soft credit.</comment>
8f069c03 80 <add>2.2</add>
6a488035
TO
81 </field>
82 <field>
8f069c03
EM
83 <name>currency</name>
84 <type>varchar</type>
83396bf9 85 <title>Soft Contribution Currency</title>
8f069c03
EM
86 <length>3</length>
87 <default>NULL</default>
88 <comment>3 character string, value from config setting or input via user.</comment>
89 <add>3.2</add>
90 <pseudoconstant>
91 <table>civicrm_currency</table>
92 <keyColumn>name</keyColumn>
93 <labelColumn>full_name</labelColumn>
c3de5c5a 94 <nameColumn>name</nameColumn>
a8fdb24e 95 <abbrColumn>symbol</abbrColumn>
8f069c03
EM
96 </pseudoconstant>
97 <html>
98 <type>Select</type>
99 </html>
6a488035 100 </field>
3c7d2158 101 <field>
8f069c03
EM
102 <name>pcp_id</name>
103 <type>int unsigned</type>
047c5009 104 <title>PCP ID</title>
8f069c03
EM
105 <default>NULL</default>
106 <comment>FK to civicrm_pcp.id</comment>
57e94608 107 <html>
047c5009 108 <label>PCP</label>
57e94608 109 </html>
8f069c03 110 <add>2.2</add>
3c151c70 111 <pseudoconstant>
112 <table>civicrm_pcp</table>
113 <keyColumn>id</keyColumn>
114 <labelColumn>title</labelColumn>
115 </pseudoconstant>
3c7d2158 116 </field>
6a488035 117 <foreignKey>
8f069c03
EM
118 <name>pcp_id</name>
119 <table>civicrm_pcp</table>
120 <key>id</key>
121 <add>3.1</add>
122 <onDelete>SET NULL</onDelete>
6a488035
TO
123 </foreignKey>
124 <index>
8f069c03
EM
125 <name>index_id</name>
126 <fieldName>pcp_id</fieldName>
127 <add>2.2</add>
128 </index>
129 <field>
130 <name>pcp_display_in_roll</name>
131 <type>boolean</type>
83396bf9 132 <title>Soft Contribution Display on PCP</title>
8f069c03 133 <default>0</default>
c1e814c7 134 <required>true</required>
8f069c03 135 <add>2.2</add>
3c7d2158 136 </field>
6a488035 137 <field>
8f069c03
EM
138 <name>pcp_roll_nickname</name>
139 <type>varchar</type>
83396bf9 140 <title>Soft Contribution PCP Nickname</title>
8f069c03
EM
141 <length>255</length>
142 <default>NULL</default>
143 <add>2.2</add>
6a488035
TO
144 </field>
145 <field>
8f069c03
EM
146 <name>pcp_personal_note</name>
147 <type>varchar</type>
83396bf9 148 <title>Soft Contribution PCP Note</title>
8f069c03 149 <length>255</length>
bddddc63 150 <html>
151 <type>TextArea</type>
152 </html>
8f069c03
EM
153 <default>NULL</default>
154 <add>2.2</add>
6a488035 155 </field>
51fa20cb 156 <field>
8f069c03
EM
157 <name>soft_credit_type_id</name>
158 <type>int unsigned</type>
159 <default>NULL</default>
160 <title>Soft Credit Type</title>
161 <pseudoconstant>
162 <optionGroupName>soft_credit_type</optionGroupName>
163 </pseudoconstant>
164 <comment>Soft Credit Type ID.Implicit FK to civicrm_option_value where option_group = soft_credit_type.</comment>
165 <add>2.2</add>
51fa20cb 166 </field>
6a488035 167</table>