Merge pull request #18246 from sunilpawar/report_45
[civicrm-core.git] / xml / schema / Contribute / PremiumsProduct.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contribute</base>
5 <class>PremiumsProduct</class>
6 <name>civicrm_premiums_product</name>
7 <comment>joins premiums (settings) to individual product/premium items - determines which products are available for a given contribution page</comment>
8 <add>1.4</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <title>Premium Product ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Contribution ID</comment>
16 <add>1.4</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>premiums_id</name>
24 <title>Premium</title>
25 <type>int unsigned</type>
26 <required>true</required>
27 <comment>Foreign key to premiums settings record.</comment>
28 <add>1.4</add>
29 </field>
30 <foreignKey>
31 <name>premiums_id</name>
32 <table>civicrm_premiums</table>
33 <key>id</key>
34 <add>1.4</add>
35 </foreignKey>
36 <field>
37 <name>product_id</name>
38 <title>Product</title>
39 <type>int unsigned</type>
40 <required>true</required>
41 <comment>Foreign key to each product object.</comment>
42 <add>1.4</add>
43 </field>
44 <foreignKey>
45 <name>product_id</name>
46 <table>civicrm_product</table>
47 <key>id</key>
48 <add>1.4</add>
49 </foreignKey>
50 <field>
51 <name>weight</name>
52 <title>Order</title>
53 <type>int unsigned</type>
54 <required>true</required>
55 <add>2.0</add>
56 </field>
57 <field>
58 <name>financial_type_id</name>
59 <title>Financial Type</title>
60 <type>int unsigned</type>
61 <default>NULL</default>
62 <pseudoconstant>
63 <table>civicrm_financial_type</table>
64 <keyColumn>id</keyColumn>
65 <labelColumn>name</labelColumn>
66 </pseudoconstant>
67 <comment>FK to Financial Type.</comment>
68 <add>4.3</add>
69 </field>
70 <foreignKey>
71 <name>financial_type_id</name>
72 <table>civicrm_financial_type</table>
73 <key>id</key>
74 <onDelete>SET NULL</onDelete>
75 <add>4.3</add>
76 </foreignKey>
77 </table>