| 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>sort_position</name> |
| 52 | <title>Sort Position</title> |
| 53 | <type>int unsigned</type> |
| 54 | <required>true</required> |
| 55 | <add>1.4</add> |
| 56 | <drop>2.0</drop> |
| 57 | </field> |
| 58 | <field> |
| 59 | <name>weight</name> |
| 60 | <title>Order</title> |
| 61 | <type>int unsigned</type> |
| 62 | <required>true</required> |
| 63 | <add>2.0</add> |
| 64 | </field> |
| 65 | <field> |
| 66 | <name>financial_type_id</name> |
| 67 | <title>Financial Type</title> |
| 68 | <type>int unsigned</type> |
| 69 | <default>NULL</default> |
| 70 | <pseudoconstant> |
| 71 | <table>civicrm_financial_type</table> |
| 72 | <keyColumn>id</keyColumn> |
| 73 | <labelColumn>name</labelColumn> |
| 74 | </pseudoconstant> |
| 75 | <comment>FK to Financial Type.</comment> |
| 76 | <add>4.3</add> |
| 77 | </field> |
| 78 | <foreignKey> |
| 79 | <name>financial_type_id</name> |
| 80 | <table>civicrm_financial_type</table> |
| 81 | <key>id</key> |
| 82 | <onDelete>SET NULL</onDelete> |
| 83 | <add>4.3</add> |
| 84 | </foreignKey> |
| 85 | </table> |