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