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) »
  • Error installing CiviCRM 2.1 "Cannot execute CREATE TABLE civicrm_price_field"
Pages: [1]

Author Topic: Error installing CiviCRM 2.1 "Cannot execute CREATE TABLE civicrm_price_field"  (Read 1792 times)

maxferrario

  • Guest
Error installing CiviCRM 2.1 "Cannot execute CREATE TABLE civicrm_price_field"
October 19, 2008, 11:06:25 am
Hi,
I had this problem while trying to install Civicrm + Drupal 6.4 on a windows XP + apache + mysql 5.0.51a host.
The installation process stopped with the following error:
Quote
Cannot execute -- * -- * CREATE TABLE civicrm_price_field ( id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Price Field', price_set_id int unsigned NOT NULL COMMENT 'FK to civicrm_price_set', name varchar(255) NOT NULL COMMENT 'Variable name/programmatic handle for this field.', label varchar(255) NOT NULL COMMENT 'Text for form field label (also friendly name for administering this field).', html_type enum('Text', 'Select', 'Radio', 'CheckBox') NOT NULL , is_enter_qty tinyint DEFAULT 0 COMMENT 'Enter a quantity for this field?', help_pre text COMMENT 'Description and/or help text to display before this field.', help_post text COMMENT 'Description and/or help text to display after this field.', weight int DEFAULT 1 COMMENT 'Order in which the fields should appear', is_display_amounts tinyint DEFAULT 1 COMMENT 'Should the price be displayed next to the label for each option?', options_per_line int unsigned DEFAULT 1 COMMENT 'number of options per line for checkbox and radio', is_active tinyint DEFAULT 1 COMMENT 'Is this price field active', is_required tinyint DEFAULT 1 COMMENT 'Is this price field required (value must be > 1)', active_on datetime DEFAULT 0 COMMENT 'If non-zero, do not show this field before the date specified', expire_on datetime DEFAULT 0 COMMENT 'If non-zero, do not show this field after the date specified', javascript varchar(255) COMMENT 'Optional scripting attributes for field' , PRIMARY KEY ( id ) , INDEX index_name( name ) , CONSTRAINT FK_civicrm_price_field_price_set_id FOREIGN KEY (price_set_id) REFERENCES civicrm_price_set(id) ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci: DB Error: unknown error

I tried to execute the CREATE TABLE query by hand and got back an error message complaining about the default value 0 of active_on and expire_on fields.

I manually changed the default values to NULL in the civicrm.mysql file (it's in the civicrm/sql folder) and the installation completed.

I am not sure if this is a CiviCRM or mysql bug, nor if the new default values I choose are OK, but hope this helps if you are stuck with this error and cannot complete CiviCRM installation.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Error installing CiviCRM 2.1 "Cannot execute CREATE TABLE civicrm_price_field"
October 20, 2008, 10:34:22 am
Looks like it's a difference either in MySQL versions or ANSI enforcement settings. The default should be NULL for broad compatibility and I've fixed this going forward:

http://issues.civicrm.org/jira/browse/CRM-3730
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Error installing CiviCRM 2.1 "Cannot execute CREATE TABLE civicrm_price_field"

This forum was archived on 2017-11-26.