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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Installation failes with: DB ERROR: constraint violation
Pages: [1]

Author Topic: Installation failes with: DB ERROR: constraint violation  (Read 1260 times)

wisco.disco

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 2.2.9
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.2
Installation failes with: DB ERROR: constraint violation
June 06, 2011, 01:44:01 pm
Hello,

I'm attempting to install CiviCRM 4.0.2 on FreeBSD 8.2-RELEASE (x64) with MySQL 5.5.12 (have_innodb=YES), PHP 5.3.6 (with all requirements).

The installation begins after doing the setup checks but fails here:


Building database schema and setup files...

Cannot execute INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`) ...SNIP...
(@option_group_id_label, 'Avery L7163', '{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","metric":"in","lMargin":0.18,"tMargin":0.6,"NX":2,"NY":7,"SpaceX":0.1,"SpaceY":0,"width":3.9,"height":1.5,"lPadding":0.20,"tPadding":0.20}', 'L7163', 'Avery', NULL, 0, 11, NULL, 0, 1, 1, NULL, NULL): DB Error: constraint violation

I see nothing in apache logs, and nothing else on the web interface.  I try resubmitting the page but get the same results.  If I check "Load Sample Data", I get a similar error, but on a different table.

Building database schema and setup files...
Cannot execute INSERT INTO `civicrm_custom_field` (`custom_group_id`, `name`, `label`, `data_type`, `html_type`, `text_length`, `is_required`, `weight`, `help_post`, `is_active`, `is_view`, `is_searchable`, `options_per_line`, `column_name`, `option_group_id`, `start_date_years`, `end_date_years`, `date_format`, `time_format` ) VALUES (1, 'Most_Important_Issue', 'Most Important Issue', 'String', 'Radio', 255, 0, 1, '', 1, 0, 1, NULL, 'most_important_issue_1', @option_most_id, NULL, NULL, NULL, NULL), (1, 'Marital_Status', 'Marital Status', 'String', 'Select', 255, 0, 2, '', 1, 0, 1, NULL, 'marital_status_2', @option_marital_id, NULL, NULL, NULL, NULL), (1, 'Marriage_Date', 'Marriage Date', 'Date', 'Select Date', NULL, 0, 3, '', 1, 0, 1, NULL, 'marriage_date_3', NULL, 30, 0, 'mm/dd/yy', 0);: DB Error: constraint violation

Cannot seem to get past this.  Thanks in advance your your help.

wisco.disco

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 2.2.9
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Installation failes with: DB ERROR: constraint violation
June 06, 2011, 01:44:49 pm
Forgot to mention I'm running on Drupal 7.0.2

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Installation failes with: DB ERROR: constraint violation
June 07, 2011, 01:30:58 am
Can you try making a new database, i.e. an empty fresh DB, and then install into that and see if it still fails?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

wisco.disco

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 2.2.9
  • CMS version: Drupal
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Installation failes with: DB ERROR: constraint violation
June 07, 2011, 08:45:09 am
yup, still fails  :(

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: Installation failes with: DB ERROR: constraint violation
June 07, 2011, 09:30:29 am

I just tried it locally and it works for me :(

whats your mysql sql_mode setting? I tried it with null and STRICT_TRANS_TABLES and both worked

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Installation failes with: DB ERROR: constraint violation

This forum was archived on 2017-11-26.