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