Skip to content

Commit

Permalink
CRM-17258 add created_id, owner_id to report_instances
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Sep 21, 2015
1 parent fd4e141 commit f8bb273
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CRM/Upgrade/Incremental/sql/4.6.9.mysql.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,11 @@ INSERT INTO civicrm_country (name,iso_code,region_id,is_province_abbreviated) VA
INSERT INTO civicrm_country (name,iso_code,region_id,is_province_abbreviated) VALUES("Saint Martin (French part)", "MF", "2", "0");

-- CRM-17039 - Add credit note for cancelled payments
{include file='../CRM/Upgrade/4.6.9.msg_template/civicrm_msg_template.tpl'}
{include file='../CRM/Upgrade/4.6.9.msg_template/civicrm_msg_template.tpl'}

-- CRM-17258 - Add created id, owner_id to report instances.
ALTER TABLE civicrm_report_instance
ADD COLUMN `created_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to contact table.',
ADD COLUMN `owner_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to contact table.',
ADD CONSTRAINT `FK_civicrm_report_instance_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL,
ADD CONSTRAINT `FK_civicrm_report_instance_owner_id` FOREIGN KEY (`owner_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL;
28 changes: 28 additions & 0 deletions xml/schema/Report/ReportInstance.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,34 @@
</html>
<add>2.2</add>
</field>
<field>
<name>created_id</name>
<type>int unsigned</type>
<title>Report Instance Created By</title>
<comment>FK to contact table.</comment>
<add>4.6</add>
</field>
<foreignKey>
<name>created_id</name>
<table>civicrm_contact</table>
<key>id</key>
<add>4.6</add>
<onDelete>SET NULL</onDelete>
</foreignKey>
<field>
<name>owner_id</name>
<type>int unsigned</type>
<title>Report Instance Owned By</title>
<comment>FK to contact table.</comment>
<add>4.6</add>
</field>
<foreignKey>
<name>owner_id</name>
<table>civicrm_contact</table>
<key>id</key>
<add>4.6</add>
<onDelete>SET NULL</onDelete>
</foreignKey>
<field>
<name>email_subject</name>
<title>Report Instance email Subject</title>
Expand Down

0 comments on commit f8bb273

Please sign in to comment.