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