Merge pull request #4828 from colemanw/CRM-15773
[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>
7 <add>2.2</add>
6a488035 8 <log>true</log>
3c7d2158 9 <field>
8f069c03
EM
10 <name>id</name>
11 <uniqueName>contribution_soft_id</uniqueName>
83396bf9 12 <title>Soft Contribution ID</title>
8f069c03
EM
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>
3c7d2158 19 </field>
20 <primaryKey>
8f069c03
EM
21 <name>id</name>
22 <autoincrement>true</autoincrement>
3c7d2158 23 </primaryKey>
24 <field>
8f069c03 25 <name>contribution_id</name>
83396bf9 26 <title>Soft Contribution - Contribution</title>
8f069c03
EM
27 <type>int unsigned</type>
28 <required>true</required>
29 <comment>FK to contribution table.</comment>
30 <add>2.2</add>
3c7d2158 31 </field>
32 <foreignKey>
8f069c03
EM
33 <name>contribution_id</name>
34 <table>civicrm_contribution</table>
35 <key>id</key>
36 <add>2.2</add>
37 <onDelete>CASCADE</onDelete>
6a488035 38 </foreignKey>
3c7d2158 39 <field>
8f069c03
EM
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>
3c7d2158 50 </field>
51 <foreignKey>
8f069c03
EM
52 <name>contact_id</name>
53 <table>civicrm_contact</table>
54 <key>id</key>
55 <add>2.2</add>
56 <onDelete>CASCADE</onDelete>
3c7d2158 57 </foreignKey>
58 <field>
8f069c03 59 <name>amount</name>
83396bf9 60 <title>Soft Contribution Amount</title>
8f069c03
EM
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>
6a488035
TO
68 </field>
69 <field>
8f069c03
EM
70 <name>currency</name>
71 <type>varchar</type>
83396bf9 72 <title>Soft Contribution Currency</title>
8f069c03
EM
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>numeric_code</nameColumn>
82 </pseudoconstant>
83 <html>
84 <type>Select</type>
85 </html>
6a488035 86 </field>
3c7d2158 87 <field>
8f069c03
EM
88 <name>pcp_id</name>
89 <type>int unsigned</type>
83396bf9 90 <title>Soft Contribution PCP</title>
8f069c03
EM
91 <default>NULL</default>
92 <comment>FK to civicrm_pcp.id</comment>
93 <add>2.2</add>
3c7d2158 94 </field>
6a488035 95 <foreignKey>
8f069c03
EM
96 <name>pcp_id</name>
97 <table>civicrm_pcp</table>
98 <key>id</key>
99 <add>3.1</add>
100 <onDelete>SET NULL</onDelete>
6a488035
TO
101 </foreignKey>
102 <index>
8f069c03
EM
103 <name>index_id</name>
104 <fieldName>pcp_id</fieldName>
105 <add>2.2</add>
106 </index>
107 <field>
108 <name>pcp_display_in_roll</name>
109 <type>boolean</type>
83396bf9 110 <title>Soft Contribution Display on PCP</title>
8f069c03
EM
111 <default>0</default>
112 <add>2.2</add>
3c7d2158 113 </field>
6a488035 114 <field>
8f069c03
EM
115 <name>pcp_roll_nickname</name>
116 <type>varchar</type>
83396bf9 117 <title>Soft Contribution PCP Nickname</title>
8f069c03
EM
118 <length>255</length>
119 <default>NULL</default>
120 <add>2.2</add>
6a488035
TO
121 </field>
122 <field>
8f069c03
EM
123 <name>pcp_personal_note</name>
124 <type>varchar</type>
83396bf9 125 <title>Soft Contribution PCP Note</title>
8f069c03
EM
126 <length>255</length>
127 <default>NULL</default>
128 <add>2.2</add>
6a488035 129 </field>
51fa20cb 130 <field>
8f069c03
EM
131 <name>soft_credit_type_id</name>
132 <type>int unsigned</type>
133 <default>NULL</default>
134 <title>Soft Credit Type</title>
135 <pseudoconstant>
136 <optionGroupName>soft_credit_type</optionGroupName>
137 </pseudoconstant>
138 <comment>Soft Credit Type ID.Implicit FK to civicrm_option_value where option_group = soft_credit_type.</comment>
139 <add>2.2</add>
51fa20cb 140 </field>
6a488035 141</table>