CRM-15735 fix - Update payment status for pay-later membership renewal ignores Receiv...
[civicrm-core.git] / xml / schema / Core / Discount.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>Discount</class>
6 <name>civicrm_discount</name>
7 <comment>Stores discounts for events on the basis of date</comment>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>primary key</comment>
14 <add>2.1</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>entity_table</name>
22 <type>varchar</type>
23 <length>64</length>
24 <comment>physical tablename for entity being joined to discount, e.g. civicrm_event</comment>
25 <add>2.1</add>
26 </field>
27 <field>
28 <name>entity_id</name>
29 <type>int unsigned</type>
30 <required>true</required>
31 <comment>FK to entity table specified in entity_table column.</comment>
32 <add>2.1</add>
33 </field>
34 <dynamicForeignKey>
35 <idColumn>entity_id</idColumn>
36 <typeColumn>entity_table</typeColumn>
37 <add>2.1</add>
38 </dynamicForeignKey>
39 <index>
40 <name>index_entity</name>
41 <fieldName>entity_table</fieldName>
42 <fieldName>entity_id</fieldName>
43 <add>2.1</add>
44 </index>
45 <field>
46 <name>option_group_id</name>
47 <uniqueName>participant_discount_name</uniqueName>
48 <title>Discount Name</title>
49 <type>int unsigned</type>
50 <required>true</required>
51 <export>true</export>
52 <comment>FK to civicrm_price_set</comment>
53 <add>2.1</add>
54 <drop>4.3</drop>
55 </field>
56 <foreignKey>
57 <name>option_group_id</name>
58 <table>civicrm_price_set</table>
59 <key>id</key>
60 <add>2.1</add>
61 <onDelete>CASCADE</onDelete>
62 <drop>4.3</drop>
63 </foreignKey>
64 <field>
65 <name>price_set_id</name>
66 <uniqueName>participant_discount_name</uniqueName>
67 <title>Discount Name</title>
68 <type>int unsigned</type>
69 <required>true</required>
70 <export>true</export>
71 <comment>FK to civicrm_price_set</comment>
72 <add>4.3</add>
73 </field>
74 <foreignKey>
75 <name>price_set_id</name>
76 <table>civicrm_price_set</table>
77 <key>id</key>
78 <add>4.3</add>
79 <onDelete>CASCADE</onDelete>
80 </foreignKey>
81 <dynamicForeignKey>
82 <idColumn>entity_id</idColumn>
83 <typeColumn>entity_table</typeColumn>
84 </dynamicForeignKey>
85 <index>
86 <name>index_entity_option_id</name>
87 <fieldName>entity_table</fieldName>
88 <fieldName>entity_id</fieldName>
89 <fieldName>price_set_id</fieldName>
90 <add>2.1</add>
91 </index>
92 <field>
93 <name>start_date</name>
94 <type>date</type>
95 <comment>Date when discount starts.</comment>
96 <add>2.1</add>
97 </field>
98 <field>
99 <name>end_date</name>
100 <type>date</type>
101 <comment>Date when discount ends.</comment>
102 <add>2.1</add>
103 </field>
104 </table>