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) »
  • 3.1.1 to 3.2.5 fails through constraint violation - mobile phone? which .tpl?
Pages: [1]

Author Topic: 3.1.1 to 3.2.5 fails through constraint violation - mobile phone? which .tpl?  (Read 631 times)

myles

  • I post frequently
  • ***
  • Posts: 263
  • Karma: 11
3.1.1 to 3.2.5 fails through constraint violation - mobile phone? which .tpl?
November 21, 2010, 08:26:38 am
I'm working through fixing a number of errors on upgrading from 3.1.1 - It appears that a previous attempt was partially successful or something - anyway I've busily been dropping tables and have got as far as a constriant violation:

Cannot add or update a child row: a foreign key constraint fails (`ablaze_civicrm`.`civicrm_uf_field`, CONSTRAINT `FK_civicrm_uf_field_location_type_id` FOREIGN KEY (`location_type_id`) REFERENCES `civicrm_location_type` (`id`) ON DELETE SET NULL

Someone else with this problem successfully completed upgrade by hacking the .tpl file in modules/civicrm/CRM/Upgrade/Incremental/sql

(post: http://forum.civicrm.org/index.php?topic=14884.0)

But there is no .tpl for 3.1.1, just lots of betas

Any idea which to hack? Is there an easy way of working out which one I am using?

Or is there another solution to this problem?

Thanks for looking,

Myles

PS - at the start of upgrade the version field in civicrm_domain is 3.1.1 at the point it fails the field is 3.2.beta3.upgrade
« Last Edit: November 21, 2010, 10:24:18 am by myles »

myles

  • I post frequently
  • ***
  • Posts: 263
  • Karma: 11
Re: 3.1.1 to 3.2.5 fails through constraint violation - mobile phone? which .tpl?
November 23, 2010, 06:39:35 am
Confirmed: this is the same issue as identified in the post referenced above - the hard-coding of the location_type_id - In my case these are not id's 1 and 2, but 6 and 7. Altering the Update statements in the two scripts (3.2.alpha3 and 3.2.alpha4) so that the values used are actual table values has solved this particular problem...

myles

  • I post frequently
  • ***
  • Posts: 263
  • Karma: 11
issue re-curring on upgrade 4.5 alpha
October 15, 2014, 06:21:47 am
This issue is still happening - the upgrade script for the alpha release of 4.5 includes an insert statement that has location_type_id's hardcoded - changing the values manually overcomes the problem.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • 3.1.1 to 3.2.5 fails through constraint violation - mobile phone? which .tpl?

This forum was archived on 2017-11-26.