Skip to content

Instantly share code, notes, and snippets.

@roberttdev
Created July 28, 2015 20:52
Show Gist options
  • Save roberttdev/c284b1af421779174a92 to your computer and use it in GitHub Desktop.
Save roberttdev/c284b1af421779174a92 to your computer and use it in GitHub Desktop.
Error Field Error Value
Type DB_Error
Code -3
Message DB Error: constraint violation
Mode 16
UserInfo ALTER TABLE `civicrm_line_item` ADD CONSTRAINT `FK_civicrm_line_item_price_field_id` FOREIGN KEY (`price_field_id`) REFERENCES `civicrm_price_field`(id) ON DELETE SET NULL [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`aarweb`.`#sql-33c_e1`, CONSTRAINT `FK_civicrm_line_item_price_field_id` FOREIGN KEY (`price_field_id`) REFERENCES `civicrm_price_field` (`id`) ON DELETE SET NULL)]
DebugInfo ALTER TABLE `civicrm_line_item` ADD CONSTRAINT `FK_civicrm_line_item_price_field_id` FOREIGN KEY (`price_field_id`) REFERENCES `civicrm_price_field`(id) ON DELETE SET NULL [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`aarweb`.`#sql-33c_e1`, CONSTRAINT `FK_civicrm_line_item_price_field_id` FOREIGN KEY (`price_field_id`) REFERENCES `civicrm_price_field` (`id`) ON DELETE SET NULL)]
PEAR_Exception: DB Error: constraint violation in unknown on line unknown
- DB_Error: DB Error: constraint violation in unknown on line unknown
Exception trace
# Function Location
0 CRM_Core_Error::exceptionHandler(Object(DB_Error)) unknown:unknown
1 call_user_func(Array, Object(DB_Error)) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/packages/PEAR.php:931
2 PEAR_Error->PEAR_Error('DB Error: constr…', -3, 16, Array, 'ALTER TABLE `civ…') /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/packages/DB.php:969
3 DB_Error->DB_Error(-3, 16, Array, 'ALTER TABLE `civ…') /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/packages/PEAR.php:564
4 PEAR->raiseError(null, -3, null, null, 'ALTER TABLE `civ…', 'DB_Error', true) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/packages/DB/common.php:1905
5 DB_common->raiseError(-3, null, null, null, '1452 ** Cannot a…') /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/packages/DB/mysql.php:898
6 DB_mysql->mysqlRaiseError() /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/packages/DB/mysql.php:327
7 DB_mysql->simpleQuery('ALTER TABLE `civ…') /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/packages/DB/common.php:1216
8 DB_common->query('ALTER TABLE `civ…') /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Utils/File.php:284
9 CRM_Utils_File::sourceSQLFile('mysql://root:o4M…', ' SELECT @wo…', null, true) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Upgrade/Form.php:160
10 CRM_Upgrade_Form->source(' SELECT @wo…', true) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Upgrade/Form.php:300
11 CRM_Upgrade_Form->processLocales('/srv/www/www.aar…', '4.3.alpha1') /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Upgrade/Form.php:324
12 CRM_Upgrade_Form->processSQL('4.3.alpha1') /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourThree.php:1247
13 CRM_Upgrade_Incremental_php_FourThree::task_4_3_x_runSql(Object(CRM_Queue_TaskContext), '4.3.alpha1') unknown:unknown
14 call_user_func_array(Array, Array) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Queue/Task.php:79
15 CRM_Queue_Task->run(Object(CRM_Queue_TaskContext)) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Queue/Runner.php:186
16 CRM_Queue_Runner->runNext(true) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:44
17 {closure}() /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php:80
18 CRM_Queue_ErrorPolicy->call(Object(Closure)) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:47
19 CRM_Queue_Page_AJAX::runNext(Array) unknown:unknown
20 call_user_func(Array, Array) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php:293
21 CRM_Core_Invoke::runItem(Array) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php:76
22 CRM_Core_Invoke::_invoke(Array) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php:52
23 CRM_Core_Invoke::invoke(Array) /srv/www/www.aarweb.org/htdocs/sites/all/modules/civicrm/drupal/civicrm.module:484
24 civicrm_invoke('upgrade', 'queue', 'ajax', 'runNext') unknown:unknown
25 call_user_func_array('civicrm_invoke', Array) /srv/www/www.aarweb.org/htdocs/includes/menu.inc:517
26 menu_execute_active_handler() /srv/www/www.aarweb.org/htdocs/index.php:21
27 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment