From 230a99386efa115bd8aef24b2043399b644fbb27 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sat, 7 Jul 2018 19:30:47 -0700 Subject: [PATCH] (dev/core#217) PrevNext - Make `entity_id2` optional (in SQL) --- CRM/Core/DAO/PrevNextCache.php | 4 ++-- CRM/Upgrade/Incremental/sql/5.6.alpha1.mysql.tpl | 3 +++ xml/schema/Core/PrevNextCache.xml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CRM/Core/DAO/PrevNextCache.php b/CRM/Core/DAO/PrevNextCache.php index bc01e75e1c..c55e0b7369 100644 --- a/CRM/Core/DAO/PrevNextCache.php +++ b/CRM/Core/DAO/PrevNextCache.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/PrevNextCache.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:cfce4435348e53ba9941ce5ed223c05b) + * (GenCodeChecksum:5e4976ab94ea074a01a14e9eb0dde913) */ /** @@ -127,7 +127,7 @@ class CRM_Core_DAO_PrevNextCache extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Prev Next Entity ID 2'), 'description' => 'FK to entity table specified in entity_table column.', - 'required' => TRUE, + 'required' => FALSE, 'table_name' => 'civicrm_prevnext_cache', 'entity' => 'PrevNextCache', 'bao' => 'CRM_Core_BAO_PrevNextCache', diff --git a/CRM/Upgrade/Incremental/sql/5.6.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.6.alpha1.mysql.tpl index 7e2f820f38..04dc9c84d7 100644 --- a/CRM/Upgrade/Incremental/sql/5.6.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.6.alpha1.mysql.tpl @@ -1 +1,4 @@ {* file to handle db changes in 5.6.alpha1 during upgrade *} + +ALTER TABLE civicrm_prevnext_cache + CHANGE `entity_id2` `entity_id2` int unsigned NULL COMMENT 'FK to entity table specified in entity_table column.'; diff --git a/xml/schema/Core/PrevNextCache.xml b/xml/schema/Core/PrevNextCache.xml index 5fda09bd84..caee9ef7fa 100644 --- a/xml/schema/Core/PrevNextCache.xml +++ b/xml/schema/Core/PrevNextCache.xml @@ -37,7 +37,7 @@ entity_id2 Prev Next Entity ID 2 int unsigned - true + false FK to entity table specified in entity_table column. 3.4 -- 2.25.1