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) »
  • Version information missing in civicrm database.
Pages: [1]

Author Topic: Version information missing in civicrm database.  (Read 2937 times)

kgilnack

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
    • a beautiful mix of Drupal & CiviCRM.. when things are going right
Version information missing in civicrm database.
October 02, 2009, 04:24:49 pm
I am receiving the following message every time I try to run the upgrade script.  Any suggestions or links to related resources would be greatly appreciated.

"Sorry. A non-recoverable error has occurred.

Version information missing in civicrm database."

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Version information missing in civicrm database.
October 02, 2009, 04:29:49 pm
What's your current civicrm version? I guess for some strange reason version number is missing in you civicrm_domain table.

You can run following SQL on your civicrm database.
For example your version is 2.2.0, then

Quote
UPDATE civicrm_domain SET version = '2.2.0' WHERE id = 1;

HTh

Kurund
Found this reply helpful? Support CiviCRM

kgilnack

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
    • a beautiful mix of Drupal & CiviCRM.. when things are going right
Re: Version information missing in civicrm database.
October 02, 2009, 06:06:16 pm
Thanks!  That worked great for getting the upgrade going.  Now I'm trying to work through this new error:


    Sorry. A non-recoverable error has occurred.

    DB Error: constraint violation

    Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`providers_civicrm`.`#sql-4dce_391deff`, CONSTRAINT `FK_civicrm_participant_status_id` FOREIGN KEY (`status_id`) REFERENCES `civicrm_participant_status_type` (`id`)), 1452

    Return to home page.



Error Details:
Code: [Select]

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => ALTER TABLE `civicrm_participant`
        CHANGE `status_id` `status_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.',
        ADD CONSTRAINT FK_civicrm_participant_status_id FOREIGN KEY (status_id) REFERENCES civicrm_participant_status_type (id) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`providers_civicrm`.`#sql-4dce_391deff`, CONSTRAINT `FK_civicrm_participant_status_id` FOREIGN KEY (`status_id`) REFERENCES `civicrm_participant_status_type` (`id`))]
    [type] => DB_Error
    [user_info] => ALTER TABLE `civicrm_participant`
        CHANGE `status_id` `status_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.',
        ADD CONSTRAINT FK_civicrm_participant_status_id FOREIGN KEY (status_id) REFERENCES civicrm_participant_status_type (id) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`providers_civicrm`.`#sql-4dce_391deff`, CONSTRAINT `FK_civicrm_participant_status_id` FOREIGN KEY (`status_id`) REFERENCES `civicrm_participant_status_type` (`id`))]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="ALTER TABLE `civicrm_participant`
        CHANGE `status_id` `status_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.',
        ADD CONSTRAINT FK_civicrm_participant_status_id FOREIGN KEY (status_id) REFERENCES civicrm_participant_status_type (id) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`providers_civicrm`.`#sql-4dce_391deff`, CONSTRAINT `FK_civicrm_participant_status_id` FOREIGN KEY (`status_id`) REFERENCES `civicrm_participant_status_type` (`id`))]"]
)
[/code]

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: Version information missing in civicrm database.
October 03, 2009, 10:29:50 am

we got another report on this. so most likely it is a bug in the upgrade script. Any chance you can share your db with us. if so, can you email it to deepak at webaccess.co.in

thanx

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

neha

  • I’m new here
  • *
  • Posts: 10
  • Karma: 1
  • CiviCRM version: v3.4, v4.0
  • CMS version: Drupal 6 / 7, Joomla 1.5 / 1.6
  • PHP version: php 5.3
Re: Version information missing in civicrm database.
October 05, 2009, 04:07:16 am
The issue is created here http://issues.civicrm.org/jira/browse/CRM-5173

Following is the patch that was applied to fix the issue :
Code: [Select]
+++ branches/v3.0/CRM/Upgrade/Incremental/sql/3.0.alpha1.mysql.tpl
@@ -100,6 +100,7 @@

+    UPDATE civicrm_participant SET status_id = 1 WHERE status_id IS NULL;
     ALTER TABLE `civicrm_participant`
         CHANGE `status_id` `status_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.',
         ADD CONSTRAINT FK_civicrm_participant_status_id FOREIGN KEY (status_id) REFERENCES civicrm_participant_status_type (id);

Neha
« Last Edit: October 05, 2009, 04:10:18 am by neha »

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Version information missing in civicrm database.
July 13, 2010, 09:28:18 pm
I encountered this error.  After entering the version number, it didn't fix anything.

Then I noticed something even more bizarre.  The ID of the only row in this table was not 1, but instead 4.  I have no idea, one of my precessors must have manually changed this.

I changed the id to 1 and then everything worked.

UPDATE civicrm_domain SET id = 1 WHERE id = 4;

Bizarre!  ;)
« Last Edit: July 13, 2010, 09:31:53 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Version information missing in civicrm database.

This forum was archived on 2017-11-26.