dbdae71ad5d386dc47cc962c33864a526cd4cda2
[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 </field>
74 <field>
75 <name>pcp_id</name>
76 <type>int unsigned</type>
77 <default>NULL</default>
78 <comment>FK to civicrm_pcp.id</comment>
79 <add>2.2</add>
80 </field>
81 <foreignKey>
82 <name>pcp_id</name>
83 <table>civicrm_pcp</table>
84 <key>id</key>
85 <add>3.1</add>
86 <onDelete>SET NULL</onDelete>
87 </foreignKey>
88 <index>
89 <name>index_id</name>
90 <fieldName>pcp_id</fieldName>
91 <add>2.2</add>
92 </index>
93 <field>
94 <name>pcp_display_in_roll</name>
95 <type>boolean</type>
96 <default>0</default>
97 <add>2.2</add>
98 </field>
99 <field>
100 <name>pcp_roll_nickname</name>
101 <type>varchar</type>
102 <length>255</length>
103 <default>NULL</default>
104 <add>2.2</add>
105 </field>
106 <field>
107 <name>pcp_personal_note</name>
108 <type>varchar</type>
109 <length>255</length>
110 <default>NULL</default>
111 <add>2.2</add>
112 </field>
113 </table>