Merge pull request #19356 from demeritcowboy/add-timeline-buttons-fix
[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 <component>CiviContribute</component>
11 <title>Product Premium</title>
12 <titlePlural>Product Premiums</titlePlural>
13 <field>
14 <name>id</name>
15 <title>Premium Product ID</title>
16 <type>int unsigned</type>
17 <required>true</required>
18 <comment>Contribution ID</comment>
19 <add>1.4</add>
20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
25 <field>
26 <name>premiums_id</name>
27 <title>Premium</title>
28 <type>int unsigned</type>
29 <required>true</required>
30 <comment>Foreign key to premiums settings record.</comment>
31 <add>1.4</add>
32 </field>
33 <foreignKey>
34 <name>premiums_id</name>
35 <table>civicrm_premiums</table>
36 <key>id</key>
37 <add>1.4</add>
38 </foreignKey>
39 <field>
40 <name>product_id</name>
41 <title>Product</title>
42 <type>int unsigned</type>
43 <required>true</required>
44 <comment>Foreign key to each product object.</comment>
45 <add>1.4</add>
46 </field>
47 <foreignKey>
48 <name>product_id</name>
49 <table>civicrm_product</table>
50 <key>id</key>
51 <add>1.4</add>
52 </foreignKey>
53 <field>
54 <name>weight</name>
55 <title>Order</title>
56 <type>int unsigned</type>
57 <required>true</required>
58 <add>2.0</add>
59 </field>
60 <field>
61 <name>financial_type_id</name>
62 <title>Financial Type</title>
63 <type>int unsigned</type>
64 <default>NULL</default>
65 <pseudoconstant>
66 <table>civicrm_financial_type</table>
67 <keyColumn>id</keyColumn>
68 <labelColumn>name</labelColumn>
69 </pseudoconstant>
70 <comment>FK to Financial Type.</comment>
71 <add>4.3</add>
72 </field>
73 <foreignKey>
74 <name>financial_type_id</name>
75 <table>civicrm_financial_type</table>
76 <key>id</key>
77 <onDelete>SET NULL</onDelete>
78 <add>4.3</add>
79 </foreignKey>
80 </table>