Merge remote-tracking branch 'origin/4.5' into 4.5-master-2015-02-24-17-24-05
[civicrm-core.git] / xml / schema / Contribute / PremiumsProduct.xml
CommitLineData
3c7d2158 1<?xml version="1.0" encoding="iso-8859-1" ?>
6a488035 2
3c7d2158 3<table>
4 <base>CRM/Contribute</base>
5 <class>PremiumsProduct</class>
6a488035
TO
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>
3c7d2158 8 <add>1.4</add>
6a488035 9 <log>true</log>
3c7d2158 10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Contribution ID</comment>
15 <add>1.4</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>premiums_id</name>
23 <type>int unsigned</type>
24 <required>true</required>
25 <comment>Foreign key to premiums settings record.</comment>
26 <add>1.4</add>
27 </field>
28 <foreignKey>
29 <name>premiums_id</name>
30 <table>civicrm_premiums</table>
31 <key>id</key>
32 <add>1.4</add>
33 </foreignKey>
34 <field>
35 <name>product_id</name>
36 <type>int unsigned</type>
37 <required>true</required>
38 <comment>Foreign key to each product object.</comment>
39 <add>1.4</add>
40 </field>
41 <foreignKey>
42 <name>product_id</name>
43 <table>civicrm_product</table>
44 <key>id</key>
45 <add>1.4</add>
46 </foreignKey>
47 <field>
48 <name>sort_position</name>
6a488035 49 <title>Sort Position</title>
3c7d2158 50 <type>int unsigned</type>
51 <required>true</required>
52 <add>1.4</add>
6a488035 53 <drop>2.0</drop>
3c7d2158 54 </field>
55 <field>
56 <name>weight</name>
7ecddde4 57 <title>Order</title>
3c7d2158 58 <type>int unsigned</type>
59 <required>true</required>
60 <add>2.0</add>
61 </field>
62 <field>
63 <name>financial_type_id</name>
6a488035 64 <title>Financial Type</title>
3c7d2158 65 <type>int unsigned</type>
6a488035 66 <default>NULL</default>
6cc0b7bd
EM
67 <pseudoconstant>
68 <table>civicrm_financial_type</table>
69 <keyColumn>id</keyColumn>
70 <labelColumn>name</labelColumn>
71 </pseudoconstant>
6a488035 72 <comment>FK to Financial Type.</comment>
3c7d2158 73 <add>4.3</add>
74 </field>
75 <foreignKey>
76 <name>financial_type_id</name>
77 <table>civicrm_financial_type</table>
78 <key>id</key>
6a488035
TO
79 <onDelete>SET NULL</onDelete>
80 <add>4.3</add>
3c7d2158 81 </foreignKey>
6a488035 82</table>