Commit dbb4e4f9 authored by eileen's avatar eileen

Remove foreign key on civicrm_acl_contact_id.user_id.

This won't actually remove it from installs - we need to address that separately via ensuring people can and do run
the System.updateIndices api call but it removes it from new installs and from
tests, hence the test should pass
parent a99b82c5
......@@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Contact/ACLContactCache.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:4bb9eaae5704bfc98c258aa2f2130f5c)
* (GenCodeChecksum:ab40fa26e037ef4897359d3c288d42b8)
*/
/**
......@@ -73,7 +73,6 @@ class CRM_Contact_DAO_ACLContactCache extends CRM_Core_DAO {
public static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'user_id', 'civicrm_contact', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
......@@ -108,7 +107,6 @@ class CRM_Contact_DAO_ACLContactCache extends CRM_Core_DAO {
'entity' => 'ACLContactCache',
'bao' => 'CRM_Contact_DAO_ACLContactCache',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
],
'contact_id' => [
'name' => 'contact_id',
......
......@@ -795,8 +795,7 @@ class CRM_Dedupe_MergerTest extends CiviUnitTestCase {
0 => 'contact_id',
),
'civicrm_acl_contact_cache' => array(
0 => 'user_id',
1 => 'contact_id',
0 => 'contact_id',
),
'civicrm_action_log' => array(
0 => 'contact_id',
......@@ -1002,8 +1001,7 @@ WHERE
// There might be cleverer ways to do this but it shouldn't change much.
$cidRefs['civicrm_contact'][0] = 'primary_contact_id';
$cidRefs['civicrm_contact'][1] = 'employer_id';
$cidRefs['civicrm_acl_contact_cache'][0] = 'user_id';
$cidRefs['civicrm_acl_contact_cache'][1] = 'contact_id';
$cidRefs['civicrm_acl_contact_cache'][0] = 'contact_id';
$cidRefs['civicrm_mailing'][0] = 'created_id';
$cidRefs['civicrm_mailing'][1] = 'scheduled_id';
$cidRefs['civicrm_mailing'][2] = 'approver_id';
......
......@@ -25,13 +25,6 @@
<comment>FK to civicrm_contact (could be null for anon user)</comment>
<add>3.1</add>
</field>
<foreignKey>
<name>user_id</name>
<table>civicrm_contact</table>
<key>id</key>
<add>3.1</add>
<onDelete>CASCADE</onDelete>
</foreignKey>
<field>
<name>contact_id</name>
<title>Contact ID</title>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment