From f8bb273f2cd5381bff09a39d04bd0448031b4115 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 22 Sep 2015 10:51:15 +1200 Subject: [PATCH] CRM-17258 add created_id, owner_id to report_instances --- CRM/Upgrade/Incremental/sql/4.6.9.mysql.tpl | 9 ++++++- xml/schema/Report/ReportInstance.xml | 28 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/CRM/Upgrade/Incremental/sql/4.6.9.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.6.9.mysql.tpl index 609af49d14cb..991a0e96de8c 100644 --- a/CRM/Upgrade/Incremental/sql/4.6.9.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.6.9.mysql.tpl @@ -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'} \ No newline at end of file +{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; diff --git a/xml/schema/Report/ReportInstance.xml b/xml/schema/Report/ReportInstance.xml index 461a94fed0fa..9ce2b3fb98cb 100644 --- a/xml/schema/Report/ReportInstance.xml +++ b/xml/schema/Report/ReportInstance.xml @@ -133,6 +133,34 @@ 2.2 + + created_id + int unsigned + Report Instance Created By + FK to contact table. + 4.6 + + + created_id + civicrm_contact
+ id + 4.6 + SET NULL +
+ + owner_id + int unsigned + Report Instance Owned By + FK to contact table. + 4.6 + + + owner_id + civicrm_contact
+ id + 4.6 + SET NULL +
email_subject Report Instance email Subject