Merge pull request #1080 from davecivicrm/eventPermissionNoticeFix
[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 </field>
80 <field>
81 <name>pcp_id</name>
82 <type>int unsigned</type>
83 <default>NULL</default>
84 <comment>FK to civicrm_pcp.id</comment>
85 <add>2.2</add>
86 </field>
87 <foreignKey>
88 <name>pcp_id</name>
89 <table>civicrm_pcp</table>
90 <key>id</key>
91 <add>3.1</add>
92 <onDelete>SET NULL</onDelete>
93 </foreignKey>
94 <index>
95 <name>index_id</name>
96 <fieldName>pcp_id</fieldName>
97 <add>2.2</add>
98 </index>
99 <field>
100 <name>pcp_display_in_roll</name>
101 <type>boolean</type>
102 <default>0</default>
103 <add>2.2</add>
104 </field>
105 <field>
106 <name>pcp_roll_nickname</name>
107 <type>varchar</type>
108 <length>255</length>
109 <default>NULL</default>
110 <add>2.2</add>
111 </field>
112 <field>
113 <name>pcp_personal_note</name>
114 <type>varchar</type>
115 <length>255</length>
116 <default>NULL</default>
117 <add>2.2</add>
118 </field>
119 </table>