CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.7 Release Testing »
  • 4.6.10 > 4.7 beta1 upgrade error (dupicate entry)
Pages: [1]

Author Topic: 4.6.10 > 4.7 beta1 upgrade error (dupicate entry)  (Read 435 times)

magnolia61

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34 / Joomla 3.3.6
  • MySQL version: MySQL 5.5.40
  • PHP version: PHP 5.5.19
4.6.10 > 4.7 beta1 upgrade error (dupicate entry)
December 04, 2015, 01:06:47 am
Hello guys,
Just tried to upgrade from 4.6.10 to 4.7 beta 1 and got the following fatal error during db upgrade.

ALTER TABLE civicrm_setting ADD UNIQUE INDEX index_domain_contact_name (domain_id, contact_id, name) [nativecode=1062 ** Duplicate entry '1-1-navigation' for key 'index_domain_contact_name']
DebugInfo   ALTER TABLE civicrm_setting ADD UNIQUE INDEX index_domain_contact_name (domain_id, contact_id, name) [nativecode=1062 ** Duplicate entry '1-1-navigation' for key 'index_domain_contact_name']

Cheers, Richard

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: 4.6.10 > 4.7 beta1 upgrade error (dupicate entry)
December 09, 2015, 01:05:25 pm
Any chance you could use a SQL tool (e.g. "phpmyadmin" or "mysql" or "drush civicrm-sql-cli") to run this query:

Code: [Select]
SELECT name, domain_id, contact_id, count(*) AS dupes FROM civicrm_setting cs GROUP BY name, domain_id, contact_id HAVING dupes > 1;

FWIW, the "navigation" records should be expendable. (They're auto(re)generated.) For a quick workaround, you can try running:

Code: [Select]
DELETE FROM civicrm_setting  WHERE contact_id IS NOT NULL AND name = 'navigation';

EDIT: PR: https://github.com/civicrm/civicrm-core/pull/7418
« Last Edit: December 09, 2015, 01:13:13 pm by totten »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.7 Release Testing »
  • 4.6.10 > 4.7 beta1 upgrade error (dupicate entry)

This forum was archived on 2017-11-26.