Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
CREATE TABLE `civicrm_membership_type` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Membership Id', `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain is this match entry for', `member_of_contact_id` int(10) unsigned NOT NULL COMMENT 'Owner organization for this membership type. FK to Contact ID', `contribution_type_id` int(10) unsigned NOT NULL COMMENT 'If membership is paid by a contribution - what contribution type should be used. FK to Contribution Type ID', `minimum_fee` decimal(20,2) DEFAULT '0.00' COMMENT 'Minimum fee for this membership (0 for free/complimentary memberships).', `duration_unit` enum('day','month','year','lifetime') COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Unit in which membership period is expressed.', `duration_interval` int(11) DEFAULT NULL COMMENT 'Number of duration units in membership period (e.g. 1 year, 12 months).', `period_type` enum('rolling','fixed') COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.', `fixed_period_start_day` int(11) DEFAULT NULL COMMENT 'For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.', `fixed_period_rollover_day` int(11) DEFAULT NULL COMMENT 'For fixed period memberships, signups after this day (mmdd) rollover to next period.', `relationship_type_id` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `relationship_direction` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `visibility` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `weight` int(11) DEFAULT NULL, `renewal_msg_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_msg_template.id', `renewal_reminder_day` int(11) DEFAULT NULL COMMENT 'Number of days prior to expiration to send renewal reminder', `receipt_text_signup` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Receipt Text for membership signup', `receipt_text_renewal` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Receipt Text for membership renewal', `is_active` tinyint(4) DEFAULT '1' COMMENT 'Is this membership_type enabled', `auto_renew` tinyint(4) DEFAULT '0', `autorenewal_msg_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_msg_template.id', `name_fr_FR` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `description_fr_FR` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK_civicrm_membership_type_domain_id` (`domain_id`), KEY `FK_civicrm_membership_type_member_of_contact_id` (`member_of_contact_id`), KEY `FK_civicrm_membership_type_contribution_type_id` (`contribution_type_id`), KEY `FK_civicrm_membership_type_renewal_msg_id` (`renewal_msg_id`), KEY `index_relationship_type_id` (`relationship_type_id`), KEY `FK_civicrm_membership_autorenewal_msg_id` (`autorenewal_msg_id`), CONSTRAINT `FK_civicrm_membership_type_contribution_type_id` FOREIGN KEY (`contribution_type_id`) REFERENCES `civicrm_contribution_type` (`id`), CONSTRAINT `FK_civicrm_membership_type_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`), CONSTRAINT `FK_civicrm_membership_type_member_of_contact_id` FOREIGN KEY (`member_of_contact_id`) REFERENCES `civicrm_contact` (`id`), CONSTRAINT `FK_civicrm_membership_type_renewal_msg_id` FOREIGN KEY (`renewal_msg_id`) REFERENCES `civicrm_msg_template` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
ErrorSQL query:---- Beperkingen voor gedumpte tabellen------ Beperkingen voor tabel `civicrm_custom_field`--ALTER TABLE `civicrm_custom_field` ADD CONSTRAINT `FK_civicrm_custom_field_custom_group_id` FOREIGN KEY ( `custom_group_id` ) REFERENCES `civicrm_custom_group` ( `id` ) ON DELETE CASCADE ;MySQL said: #1005 - Can't create table 'chautaar_chautaaradr7_crm2.#sql-6c74_177623' (errno: 121) (Details...)
ErrorSQL query:---- Gegevens worden uitgevoerd voor tabel `civicrm_contact_type`--INSERT INTO `civicrm_contact_type` ( `id` , `name` , `image_URL` , `parent_id` , `is_active` , `is_reserved` , `label_fr_FR` , `description_fr_FR` , `label` , `description` ) VALUES ( 1, 'Individual', NULL , NULL , 1, 1, 'Individual', NULL , 'Individual', NULL ) , ( 2, 'Household', NULL , NULL , 1, 1, 'Household', NULL , 'Household', NULL ) , ( 3, 'Organization', NULL , NULL , 1, 1, 'Organization', NULL , 'Organization', NULL ) , ( 5, 'School', NULL , 3, 1, NULL , 'School', NULL , 'School', NULL ) ;MySQL said: #1054 - Unknown column 'label_fr_FR' in 'field list'
CiviCRM Upgrade Tasks[Error: Upgrade DB to 4.3.alpha1: SQL]Error Field Error ValueType DB_ErrorCode -3Message DB Error: constraint violationMode 16UserInfo INSERT INTO `civicrm_dashboard_contact` (dashboard_id, contact_id, column_no, is_active) SELECT (SELECT MAX(id) FROM `civicrm_dashboard`), contact_id, 1, IF (SUM(is_active) > 0, 0, 1) FROM `civicrm_dashboard_contact` WHERE 1 GROUP BY contact_id [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`chautaar_chautaaradr7_crm2`.`civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]DebugInfo INSERT INTO `civicrm_dashboard_contact` (dashboard_id, contact_id, column_no, is_active) SELECT (SELECT MAX(id) FROM `civicrm_dashboard`), contact_id, 1, IF (SUM(is_active) > 0, 0, 1) FROM `civicrm_dashboard_contact` WHERE 1 GROUP BY contact_id [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`chautaar_chautaaradr7_crm2`.`civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]PEAR_Exception: DB Error: constraint violation in unknown on line unknown- DB_Error: DB Error: constraint violation in unknown on line unknownException trace# Function Location0 CRM_Core_Error::exceptionHandler(Object(DB_Error)) unknown:unknown1 call_user_func(Array, Object(DB_Error)) /home/chautaar/public_html/sites/all/modules/civicrm/packages/PEAR.php:9312 PEAR_Error->PEAR_Error('DB Error: constr…', -3, 16, Array, 'INSERT INTO `civ…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB.php:9693 DB_Error->DB_Error(-3, 16, Array, 'INSERT INTO `civ…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/PEAR.php:5644 PEAR->raiseError(null, -3, null, null, 'INSERT INTO `civ…', 'DB_Error', true) /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/common.php:19055 DB_common->raiseError(-3, null, null, null, '1452 ** Cannot a…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/mysql.php:8986 DB_mysql->mysqlRaiseError() /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/mysql.php:3277 DB_mysql->simpleQuery('INSERT INTO `civ…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/common.php:12168 DB_common->query('INSERT INTO `civ…') /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Utils/File.php:2849 CRM_Utils_File::sourceSQLFile('mysql://chautaar…', ' SELECT @wo…', null, true) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Upgrade/Form.php:15910 CRM_Upgrade_Form->source(' SELECT @wo…', true) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Upgrade/Form.php:29911 CRM_Upgrade_Form->processLocales('/home/chautaar/p…', '4.3.alpha1') /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Upgrade/Form.php:32312 CRM_Upgrade_Form->processSQL('4.3.alpha1') /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourThree.php:94513 CRM_Upgrade_Incremental_php_FourThree::task_4_3_x_runSql(Object(CRM_Queue_TaskContext), '4.3.alpha1') unknown:unknown14 call_user_func_array(Array, Array) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/Task.php:7915 CRM_Queue_Task->run(Object(CRM_Queue_TaskContext)) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/Runner.php:18616 CRM_Queue_Runner->runNext(true) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:4417 {closure}() /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php:8018 CRM_Queue_ErrorPolicy->call(Object(Closure)) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:4719 CRM_Queue_Page_AJAX::runNext(Array) unknown:unknown20 call_user_func(Array, Array) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:25821 CRM_Core_Invoke::runItem(Array) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:7022 CRM_Core_Invoke::_invoke(Array) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:5223 CRM_Core_Invoke::invoke(Array) /home/chautaar/public_html/sites/all/modules/civicrm/drupal/civicrm.module:43624 civicrm_invoke('upgrade', 'queue', 'ajax', 'runNext') unknown:unknown25 call_user_func_array('civicrm_invoke', Array) /home/chautaar/public_html/includes/menu.inc:51726 menu_execute_active_handler() /home/chautaar/public_html/index.php:21