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.3.3 to 3.3.4 "Column 'domain_id' cannot be null" error
Pages: [1]

Author Topic: 3.3.3 to 3.3.4 "Column 'domain_id' cannot be null" error  (Read 1495 times)

pbarmak

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 3
  • CiviCRM version: 3.3.5
  • CMS version: Pressflow 6.19
  • MySQL version: 5.1
  • PHP version: 5.2.10
3.3.3 to 3.3.4 "Column 'domain_id' cannot be null" error
February 08, 2011, 09:13:04 am
We get the following error when upgrading from 3.3.3 to 3.3.4 and I'm not sure where the db upgrade script resides so I can track it down (for some reason, it's not finding the value for the @domain_id variable, which it uses in the insert statement).  Can someone point me to the upgrade script directory real quick?

Partial message:
Code: [Select]
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO `civicrm_report_instance`
    ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`)
VALUES
    ( @domainID, 'Grant Report (Statistics)', 'grant/statistics', 'Shows statistics for Grants', 'access CiviGrant', 'a:45:{s:6:"fields";a:3:{s:18:"summary_statistics";s:1:"1";s:9:"gender_id";s:1:"1";s:12:"contact_type";s:1:"1";}s:34:"application_received_date_relative";s:1:"0";s:30:"application_received_date_from";s:0:"";s:28:"application_received_date_to";s:0:"";s:22:"decision_date_relative";s:1:"0";s:18:"decision_date_from";s:0:"";s:16:"decision_date_to";s:0:"";s:28:"money_transfer_date_relative";s:1:"0";s:24:"money_transfer_date_from";s:0:"";s:22:"money_transfer_date_to";s:0:"";s:23:"grant_due_date_relative";s:1:"0";s:19:"grant_due_date_from";s:0:"";s:17:"grant_due_date_to";s:0:"";s:13:"grant_type_op";s:2:"in";s:16:"grant_type_value";a:1:{i:0;s:1:"1";}s:12:"status_id_op";s:2:"in";s:15:"status_id_value";a:0:{}s:20:"amount_requested_min";s:0:"";s:20:"amount_requested_max";s:0:"";s:19:"amount_requested_op";s:3:"lte";s:22:"amount_requested_value";s:0:"";s:18:"amount_granted_min";s:0:"";s:18:"amount_granted_max";s:0:"";s:17:"amount_granted_op";s:3:"lte";s:20:"amount_granted_value";s:0:"";s:24:"grant_report_received_op";s:2:"eq";s:27:"grant_report_received_value";s:0:"";s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"region_id_op";s:2:"in";s:15:"region_id_value";a:0:{}s:11:"custom_7_op";s:2:"in";s:14:"custom_7_value";a:0:{}s:11:"custom_9_op";s:3:"has";s:14:"custom_9_value";s:0:"";s:11:"custom_8_op";s:4:"mhas";s:14:"custom_8_value";a:0:{}s:11:"description";s:28:"Shows statistics for Grants.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:16:"access CiviGrant";s:9:"parent_id";s:0:"";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}') [nativecode=1048 ** Column 'domain_id' cannot be null]

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: 3.3.3 to 3.3.4 "Column 'domain_id' cannot be null" error
February 08, 2011, 10:39:39 am
There was an error in one of the upgrade files that caused the problem you're seeing. We didn't catch it because it is triggered by certain DB states - sorry.

Can you please retry the upgrade using these steps (so we can verify that we've fixed the issue):
1. Restore your pre-upgrade copy of the database so you are starting the upgrade "cleanly" (the previous upgrade attempt which failed might have left the DB in a partially upgraded state).

2. Grab this replacement file from our public repository:
http://svn.civicrm.org/civicrm/branches/v3.3/CRM/Upgrade/Incremental/sql/3.3.4.mysql.tpl
.. and copy it to the corresponding directory in the copy of the site you are upgrading - e.g. civicrm/CRM/Upgrade/Incremental/sql/

3. Run the upgrade script again (http://<your site>/civicrm/upgrade?reset=1)

Please let us know how this works for you.
Protect your investment in CiviCRM by  becoming a Member!

pbarmak

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 3
  • CiviCRM version: 3.3.5
  • CMS version: Pressflow 6.19
  • MySQL version: 5.1
  • PHP version: 5.2.10
Re: 3.3.3 to 3.3.4 "Column 'domain_id' cannot be null" error
February 09, 2011, 08:16:17 am
Thanks Dave.  By the time I got to this, I saw you all had 3.3.5 out with fixes, so I upgraded straight to that (after reverting to a 3.3.3 backup).  That worked out as expected, no errors, just fyi.  Thanks for jumping on these issues, we really appreciate it!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • 3.3.3 to 3.3.4 "Column 'domain_id' cannot be null" error

This forum was archived on 2017-11-26.