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) »
  • Constraint Errors and other database questions - need answers
Pages: [1]

Author Topic: Constraint Errors and other database questions - need answers  (Read 1290 times)

Shadow

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 1
Constraint Errors and other database questions - need answers
March 04, 2009, 06:09:02 pm
Hi once Again - I need some answers, so if one of the knowledgeable people would take the time to answer these questions, maybe I can fix my database, which has been down for four days now, and I can move on to other projects.

A bit of background:
I upgraded my DRUPAL 5 site to DRUPAL 6, not knowing that CiviCRM 2.0x was NOT compatible with DRUPAL 6.  When I completed the update, a very extensive one due to the number of modules, I discovered this fact.  I posted a request for help on this forum (see the topic "DRUPAL 6/CivicSpace 2 upgrade gone wrong") and it was suggested that I create a new DRUPAL 5 site and use that site to upgrade my data to CiviCRM 2.0 and export that data into my live site and upgrade that to 2.1.  Fine - after several problems, I finally figure it out and got my data imported into the new DRUPAL 5 site and started to upgrade the data.  Then I ran into new problems and I need answers to some questions so I can figure out what is going on and solve the problems.

The current problems and questions:
I am upgrading my database, which was CiviCRM 1.9 to CiviCRM 2.0 in order to finally upgrade it to 2.1

I am getting DB constraint violations when the upgrade process runs.  These seems to be happening, according to the error message, when executing a DROP IF EXIST command.  I also noticed that when I imported my data into the DRUPAL 5 site, I had 101 tables.  After the upgrade process crashed there were only 71 tables in the database.

Question: If the upgrade process are droping my tables, will it load my data back into the new database?  Am I losing data?

Question: I am getting constraint violations - I THINK it might be a null value but am not sure.  How can I find out what is the problem here and fix it?

Question: Should I import my data back into my DRUPAL 5 site and reload the CiviCRM 1.9 codebase and then fix the errors causing the constraint error?

Question: If I do reload the 1.9 codebase and import my backup data inot the 1.9 database,  should I export the data only to a SQL file and import that into a blank CiviCRM 2.0 database after running the install feature RATHER than the upgrade procedure?

Thanks for any help with these questions
« Last Edit: March 04, 2009, 06:11:53 pm by Shadow »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Constraint Errors and other database questions - need answers
March 04, 2009, 06:32:35 pm

if you have the $, you might want to consider hiring someone from http://civicrm.org/professional/

if not, i would restart with a clean drupal 5 / civicrm 1.9 install and upgrade first to drupal 2.0 and ensure it works. You should also download and check the db consistency tools from the good folks at dharmatech. then i would do the upgrade to 2.1, followed by 2.2 (might as well do it since u r going thru all this upgrades)

to answer your questions in order

1. yes, if you've gone down from 101 -> 71 tables, you have definitely lost data

2. you will need to check the db error message to see which table and check from there

3. i'm assuming you have a backup of your 1.9 data.

4. you will need to do the upgrade to migrate your data. the schema has changed significantly

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Shadow

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 1
Re: Constraint Errors and other database questions - need answers
March 04, 2009, 08:11:45 pm
Hey Lobo - I appreciate you taking the time to answer my questions - I know how busy you are. 

No name for a specific database was given - the error message just said tha it was during a DROP of a table - didn't say which table and the second part of the message said it was a constraint violation.  This happened roughly 5 seconds into running the update procedure for 2.0

Yes - I have a backup of the data - it is what I used to create the database on the DRUPAL 5 site.  What I did was load that data into an empty database and in believing it was ALREADY a 1.9 database (since that was what I exported it from) I loaded the 2.0 codebase and tried to trigger the update.  But that must be a wrong step.  So I will take your advice and get a working 1.9 CiviCRM database FIRST and then try and update that.

One final question - should I create a empty 1.9 database and then import the data or try and import the data into an empty database first and then run the 1.9 update routines.

Thanks again for your help
« Last Edit: March 04, 2009, 08:34:42 pm by Shadow »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Constraint Errors and other database questions - need answers

This forum was archived on 2017-11-26.