=> -5 [message] => DB Error: already exists [mode] => 16 [debug_info] => ALTER TABLE civicrm_entity_tag ADD UNIQUE INDEX UI_entity_id_entity_table_tag_id( entity_table, entity_id, tag_id ) [nativecode=1062 ** Duplicate entry 'civicrm_contact-416-7' for key 2] [type] => DB_Error [user_info] => ALTER TABLE civicrm_entity_tag ADD UNIQUE INDEX UI_entity_id_entity_table_tag_id( entity_table, entity_id, tag_id ) [nativecode=1062 ** Duplicate entry 'civicrm_contact-416-7' for key 2] [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="ALTER TABLE civicrm_entity_tag ADD UNIQUE INDEX UI_entity_id_entity_table_tag_id( entity_table, entity_id, tag_id ) [nativecode=1062 ** Duplicate entry 'civicrm_contact-416-7' for key 2]"])Now when I try running it again, I get: Sorry. A non-recoverable error has occurred.Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again.
DELETE et1.* from civicrm_entity_tag et1 INNER JOIN ( SELECT * FROM civicrm_entity_tag GROUP BY entity_table, entity_id, tag_id HAVING count(*) > 1 ) et2 ON et1.id = et2.id;
DELETE et2.* from civicrm_entity_tag et1 INNER JOIN civicrm_entity_tag et2 ON et1.entity_table = et2.entity_table AND et1.entity_id = et2.entity_id AND et1.tag_id = et2.tag_idWHERE et1.id < et2.id;
=> -5 [message] => DB Error: already exists [mode] => 16 [debug_info] => CREATE TABLE civicrm_mailing_recipients ( id int unsigned NOT NULL AUTO_INCREMENT , mailing_id int unsigned NOT NULL COMMENT 'The ID of the mailing this Job will send.', contact_id int unsigned NOT NULL COMMENT 'FK to Contact', email_id int unsigned NOT NULL COMMENT 'FK to Email', PRIMARY KEY ( id ), CONSTRAINT FK_civicrm_mailing_recipients_mailing_id FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id) ON DELETE CASCADE, CONSTRAINT FK_civicrm_mailing_recipients_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, CONSTRAINT FK_civicrm_mailing_recipients_email_id FOREIGN KEY (email_id) REFERENCES civicrm_email(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1050 ** Table 'civicrm_mailing_recipients' already exists] [type] => DB_Error [user_info] => CREATE TABLE civicrm_mailing_recipients ( id int unsigned NOT NULL AUTO_INCREMENT , mailing_id int unsigned NOT NULL COMMENT 'The ID of the mailing this Job will send.', contact_id int unsigned NOT NULL COMMENT 'FK to Contact', email_id int unsigned NOT NULL COMMENT 'FK to Email', PRIMARY KEY ( id ), CONSTRAINT FK_civicrm_mailing_recipients_mailing_id FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id) ON DELETE CASCADE, CONSTRAINT FK_civicrm_mailing_recipients_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, CONSTRAINT FK_civicrm_mailing_recipients_email_id FOREIGN KEY (email_id) REFERENCES civicrm_email(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1050 ** Table 'civicrm_mailing_recipients' already exists] [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TABLE civicrm_mailing_recipients ( id int unsigned NOT NULL AUTO_INCREMENT , mailing_id int unsigned NOT NULL COMMENT 'The ID of the mailing this Job will send.', contact_id int unsigned NOT NULL COMMENT 'FK to Contact', email_id int unsigned NOT NULL COMMENT 'FK to Email', PRIMARY KEY ( id ), CONSTRAINT FK_civicrm_mailing_recipients_mailing_id FOREIGN KEY (mailing_id) REFERENCES civicrm_mailing(id) ON DELETE CASCADE, CONSTRAINT FK_civicrm_mailing_recipients_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE, CONSTRAINT FK_civicrm_mailing_recipients_email_id FOREIGN KEY (email_id) REFERENCES civicrm_email(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1050 ** Table 'civicrm_mailing_recipients' already exists]"])Any other ideas from this?
Sorry. A non-recoverable error has occurred.DB Error: already existsError DetailsDatabase Error Code: Table 'civicrm_setting' already exists, 1050Additional Details:Array( [callback] => Array ( [0] => CRM_Core_Error [1] => handle ) [code] => -5 [message] => DB Error: already exists [mode] => 16 [debug_info] => CREATE TABLE `civicrm_setting` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `group_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'group name for setting element, useful in caching setting elements', `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Unique name for setting', `value` text COLLATE utf8_unicode_ci COMMENT 'data associated with this group / name combo', `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain is this menu item for', `contact_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Contact ID if the setting is localized to a contact', `is_domain` tinyint(4) DEFAULT NULL COMMENT 'Is this setting a contact specific or site wide setting?', `component_id` int(10) unsigned DEFAULT NULL COMMENT 'Component that this menu item belongs to', `created_date` datetime DEFAULT NULL COMMENT 'When was the setting created', `created_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_contact, who created this setting', PRIMARY KEY (`id`), KEY `index_group_name` (`group_name`,`name`), KEY `FK_civicrm_setting_domain_id` (`domain_id`), KEY `FK_civicrm_setting_contact_id` (`contact_id`), KEY `FK_civicrm_setting_component_id` (`component_id`), KEY `FK_civicrm_setting_created_id` (`created_id`), CONSTRAINT `FK_civicrm_setting_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`) ON DELETE CASCADE, CONSTRAINT `FK_civicrm_setting_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE, CONSTRAINT `FK_civicrm_setting_component_id` FOREIGN KEY (`component_id`) REFERENCES `civicrm_component` (`id`), CONSTRAINT `FK_civicrm_setting_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 [nativecode=1050 ** Table 'civicrm_setting' already exists] [type] => DB_Error [user_info] => CREATE TABLE `civicrm_setting` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `group_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'group name for setting element, useful in caching setting elements', `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Unique name for setting', `value` text COLLATE utf8_unicode_ci COMMENT 'data associated with this group / name combo', `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain is this menu item for', `contact_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Contact ID if the setting is localized to a contact', `is_domain` tinyint(4) DEFAULT NULL COMMENT 'Is this setting a contact specific or site wide setting?', `component_id` int(10) unsigned DEFAULT NULL COMMENT 'Component that this menu item belongs to', `created_date` datetime DEFAULT NULL COMMENT 'When was the setting created', `created_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_contact, who created this setting', PRIMARY KEY (`id`), KEY `index_group_name` (`group_name`,`name`), KEY `FK_civicrm_setting_domain_id` (`domain_id`), KEY `FK_civicrm_setting_contact_id` (`contact_id`), KEY `FK_civicrm_setting_component_id` (`component_id`), KEY `FK_civicrm_setting_created_id` (`created_id`), CONSTRAINT `FK_civicrm_setting_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`) ON DELETE CASCADE, CONSTRAINT `FK_civicrm_setting_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE, CONSTRAINT `FK_civicrm_setting_component_id` FOREIGN KEY (`component_id`) REFERENCES `civicrm_component` (`id`), CONSTRAINT `FK_civicrm_setting_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 [nativecode=1050 ** Table 'civicrm_setting' already exists] [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TABLE `civicrm_setting` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `group_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'group name for setting element, useful in caching setting elements', `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Unique name for setting', `value` text COLLATE utf8_unicode_ci COMMENT 'data associated with this group / name combo', `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain is this menu item for', `contact_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Contact ID if the setting is localized to a contact', `is_domain` tinyint(4) DEFAULT NULL COMMENT 'Is this setting a contact specific or site wide setting?', `component_id` int(10) unsigned DEFAULT NULL COMMENT 'Component that this menu item belongs to', `created_date` datetime DEFAULT NULL COMMENT 'When was the setting created', `created_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_contact, who created this setting', PRIMARY KEY (`id`), KEY `index_group_name` (`group_name`,`name`), KEY `FK_civicrm_setting_domain_id` (`domain_id`), KEY `FK_civicrm_setting_contact_id` (`contact_id`), KEY `FK_civicrm_setting_component_id` (`component_id`), KEY `FK_civicrm_setting_created_id` (`created_id`), CONSTRAINT `FK_civicrm_setting_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`) ON DELETE CASCADE, CONSTRAINT `FK_civicrm_setting_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE, CONSTRAINT `FK_civicrm_setting_component_id` FOREIGN KEY (`component_id`) REFERENCES `civicrm_component` (`id`), CONSTRAINT `FK_civicrm_setting_created_id` FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 [nativecode=1050 ** Table 'civicrm_setting' already exists]"])Return to home page.