commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / xml / schema / Grant / Grant.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Grant</base>
4 <class>Grant</class>
5 <name>civicrm_grant</name>
6 <comment>This table stores information about grants given to a contact.</comment>
7 <add>1.8</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <uniqueName>grant_id</uniqueName>
13 <title>Grant ID</title>
14 <required>true</required>
15 <comment>Unique Grant id</comment>
16 <import>true</import>
17 <add>1.8</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>contact_id</name>
25 <type>int unsigned</type>
26 <uniqueName>grant_contact_id</uniqueName>
27 <title>Contact ID</title>
28 <export>true</export>
29 <required>true</required>
30 <comment>Contact ID of contact record given grant belongs to.</comment>
31 <add>1.8</add>
32 <html>
33 <type>Autocomplete-Select</type>
34 </html>
35 </field>
36 <foreignKey>
37 <name>contact_id</name>
38 <table>civicrm_contact</table>
39 <key>id</key>
40 <add>1.8</add>
41 <onDelete>CASCADE</onDelete>
42 </foreignKey>
43 <field>
44 <name>application_received_date</name>
45 <title>Application received date</title>
46 <type>date</type>
47 <export>true</export>
48 <comment>Date on which grant application was received by donor.</comment>
49 <add>1.8</add>
50 </field>
51 <field>
52 <name>decision_date</name>
53 <title>Decision date</title>
54 <type>date</type>
55 <comment>Date on which grant decision was made.</comment>
56 <import>true</import>
57 <add>1.8</add>
58 <html>
59 <type>Select Date</type>
60 </html>
61 </field>
62 <field>
63 <name>money_transfer_date</name>
64 <uniqueName>grant_money_transfer_date</uniqueName>
65 <title>Grant Money transfer date</title>
66 <type>date</type>
67 <comment>Date on which grant money transfer was made.</comment>
68 <import>true</import>
69 <add>1.8</add>
70 <html>
71 <type>Select Date</type>
72 </html>
73 </field>
74 <field>
75 <name>grant_due_date</name>
76 <type>date</type>
77 <title>Grant Due Date</title>
78 <comment>Date on which grant report is due.</comment>
79 <add>1.8</add>
80 <html>
81 <type>Select Date</type>
82 </html>
83 </field>
84 <field>
85 <name>grant_report_received</name>
86 <title>Grant report received</title>
87 <type>boolean</type>
88 <comment>Yes/No field stating whether grant report was received by donor.</comment>
89 <import>true</import>
90 <add>1.8</add>
91 <html>
92 <type>CheckBox</type>
93 </html>
94 </field>
95 <field>
96 <name>grant_type_id</name>
97 <type>int unsigned</type>
98 <title>Grant Type</title>
99 <pseudoconstant>
100 <optionGroupName>grant_type</optionGroupName>
101 </pseudoconstant>
102 <html>
103 <type>Select</type>
104 </html>
105 <export>true</export>
106 <required>true</required>
107 <comment>Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.</comment>
108 <add>1.8</add>
109 </field>
110 <index>
111 <name>index_grant_type_id</name>
112 <fieldName>grant_type_id</fieldName>
113 <add>1.8</add>
114 </index>
115 <field>
116 <name>amount_total</name>
117 <title>Total Amount</title>
118 <type>decimal</type>
119 <required>true</required>
120 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
121 <import>true</import>
122 <comment>Requested grant amount, in default currency.</comment>
123 <add>1.8</add>
124 <html>
125 <type>Text</type>
126 </html>
127 </field>
128 <field>
129 <name>amount_requested</name>
130 <title>Amount Requested</title>
131 <type>decimal</type>
132 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
133 <comment>Requested grant amount, in original currency (optional).</comment>
134 <add>1.8</add>
135 <html>
136 <type>Text</type>
137 </html>
138 </field>
139 <field>
140 <name>amount_granted</name>
141 <title>Amount granted</title>
142 <type>decimal</type>
143 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
144 <import>true</import>
145 <comment>Granted amount, in default currency.</comment>
146 <add>1.8</add>
147 <html>
148 <type>Text</type>
149 </html>
150 </field>
151 <field>
152 <name>currency</name>
153 <title>Grant Currency</title>
154 <type>varchar</type>
155 <length>3</length>
156 <required>true</required>
157 <comment>3 character string, value from config setting or input via user.</comment>
158 <add>3.2</add>
159 <pseudoconstant>
160 <table>civicrm_currency</table>
161 <keyColumn>name</keyColumn>
162 <labelColumn>full_name</labelColumn>
163 <nameColumn>numeric_code</nameColumn>
164 </pseudoconstant>
165 <html>
166 <type>Select</type>
167 </html>
168 </field>
169 <field>
170 <name>currency</name>
171 <type>varchar</type>
172 <length>8</length>
173 <default>NULL</default>
174 <comment>3 character string, value from config setting or input via user.</comment>
175 <add>3.2</add>
176 <drop>4.3</drop>
177 </field>
178 <field>
179 <name>rationale</name>
180 <type>text</type>
181 <title>Grant Rationale</title>
182 <comment>Grant rationale.</comment>
183 <html>
184 <type>TextArea</type>
185 <rows>4</rows>
186 <cols>60</cols>
187 </html>
188 <import>true</import>
189 <add>1.8</add>
190 </field>
191 <field>
192 <name>status_id</name>
193 <type>int unsigned</type>
194 <title>Grant Status</title>
195 <uniqueName>grant_status_id</uniqueName>
196 <required>true</required>
197 <import>true</import>
198 <export>false</export>
199 <comment>Id of Grant status.</comment>
200 <pseudoconstant>
201 <optionGroupName>grant_status</optionGroupName>
202 </pseudoconstant>
203 <html>
204 <type>Select</type>
205 </html>
206 <add>1.8</add>
207 </field>
208 <index>
209 <name>index_status_id</name>
210 <fieldName>status_id</fieldName>
211 <add>1.8</add>
212 </index>
213 <field>
214 <name>financial_type_id</name>
215 <title>Financial Type</title>
216 <type>int unsigned</type>
217 <default>NULL</default>
218 <pseudoconstant>
219 <table>civicrm_financial_type</table>
220 <keyColumn>id</keyColumn>
221 <labelColumn>name</labelColumn>
222 </pseudoconstant>
223 <comment>FK to Financial Type.</comment>
224 <add>4.3</add>
225 </field>
226 <foreignKey>
227 <name>financial_type_id</name>
228 <table>civicrm_financial_type</table>
229 <key>id</key>
230 <onDelete>SET NULL</onDelete>
231 <add>4.3</add>
232 </foreignKey>
233 </table>