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) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • <solved> Upgrade from 4.3.5 to 4.3.6 is failing on SQL statement
Pages: [1]

Author Topic: <solved> Upgrade from 4.3.5 to 4.3.6 is failing on SQL statement  (Read 681 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
<solved> Upgrade from 4.3.5 to 4.3.6 is failing on SQL statement
October 30, 2013, 08:02:21 pm
My attempted upgrade from 4.3.5 to 4.3.6 is failing on the following SQL statement:

UPDATE civicrm_price_set_entity cpse LEFT JOIN civicrm_price_set cps ON cps.id = cpse.price_set_id LEFT JOIN civicrm_price_field cpf ON cps.id = cpf.price_set_id LEFT JOIN civicrm_price_field_value cpfv ON cpf.id = cpfv.price_field_id LEFT JOIN civicrm_event ce ON cpse.entity_id = ce.id AND cpse.entity_table = 'civicrm_event' LEFT JOIN civicrm_contribution_page ccg ON cpse.entity_id = ccg.id AND cpse.entity_table = 'civicrm_contribution_page' SET cpfv.financial_type_id = CASE WHEN ce.id IS NOT NULL THEN ce.financial_type_id WHEN ccg.id IS NOT NULL THEN ccg.financial_type_id END, cps.financial_type_id = CASE WHEN ce.id IS NOT NULL THEN ce.financial_type_id WHEN ccg.id IS NOT NULL THEN ccg.financial_type_id END WHERE cps.is_quick_config = 1

The error message is:  (
#1452 - Cannot add or update a child row: a foreign key constraint fails (`nsteorg_crm`.`civicrm_price_set`, CONSTRAINT `FK_civicrm_price_set_financial_type_id` FOREIGN KEY (`financial_type_id`) REFERENCES `civicrm_financial_type` (`id`))

I have tried running the SQL statement from PhpMyAdmin, but that is giving the same results.  Any other ideas?



 
« Last Edit: October 30, 2013, 09:50:34 pm by epg »
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
<solved> Upgrade from 4.3.5 to 4.3.6 is failing on SQL statement
October 30, 2013, 08:46:31 pm
Never mind, I found the issue:  I had two paid events set up that were configured to use financial types that had since been deleted.   I deleted the 2 events and then the SQL statement worked as expected.
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • <solved> Upgrade from 4.3.5 to 4.3.6 is failing on SQL statement

This forum was archived on 2017-11-26.