Ok... here's a quick fix which prevents webform from being installed (clean install)...
FIX:
Find "excluded_components" in webform.install, and remove " 'default' => '', "
Before:
'excluded_components' => array(
'description' => 'A list of components that will not be included in the %email_values token. A list of CIDs separated by commas.',
'type' => 'text',
'not null' => TRUE,
'default' => '',
),
after:
'excluded_components' => array(
'description' => 'A list of components that will not be included in the %email_values token. A list of CIDs separated by commas.',
'type' => 'text',
'not null' => TRUE
),
Here's the error if trying to do a clean install, prior to fix...
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'excluded_components' can't have a default value: CREATE TABLE {webform_emails} ( `nid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The node identifier of a webform.', `eid` SMALLINT unsigned NOT NULL DEFAULT 0 COMMENT 'The e-mail identifier for this row’s settings.', `email` TEXT DEFAULT NULL COMMENT 'The e-mail address that will be sent to upon submission. This may be an e-mail address, the special key \"default\" or a numeric value. If a numeric value is used, the value of a component will be substituted on submission.', `subject` VARCHAR(255) DEFAULT NULL COMMENT 'The e-mail subject that will be used. This may be a string, the special key \"default\" or a numeric value. If a numeric value is used, the value of a component will be substituted on submission.', `from_name` VARCHAR(255) DEFAULT NULL COMMENT 'The e-mail \"from\" name that will be used. This may be a string, the special key \"default\" or a numeric value. If a numeric value is used, the value of a component will be substituted on submission.', `from_address` VARCHAR(255) DEFAULT NULL COMMENT 'The e-mail \"from\" e-mail address that will be used. This may be a string, the special key \"default\" or a numeric value. If a numeric value is used, the value of a component will be substituted on submission.', `template` TEXT DEFAULT NULL COMMENT 'A template that will be used for the sent e-mail. This may be a string or the special key \"default\", which will use the template provided by the theming layer.', `excluded_components` TEXT NOT NULL DEFAULT '' COMMENT 'A list of components that will not be included in the %email_values token. A list of CIDs separated by commas.', PRIMARY KEY (`nid`, `eid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Holds information regarding e-mails that should be sent...'; Array ( ) in db_create_table() (line 2569 of /home/public_html/includes/database/database.inc).
Comments
Comment #1
nhck commentedThis is not fixed in current cvs - thus setting it to correct status and providing patch.
Comment #2
quicksketchWe need to test this with postGres. The default value was introduced to fix #887580: Upgrade failed from 2.x to 3.1 under PostGres. Note I'm not sure if that issue affects Drupal 7 or not.
Comment #3
quicksketchOkay, after some Googling it looks like this is the situation:
The universal solution here apparently is to:
In addition, when adding a column we can use the "initial" property to set an initial value of '' when adding a NOT NULL text column. This handbook page on Schema API explains the whole thing pretty well: https://drupal.org/node/159329
This patch makes a start but we need to fix the upgrade path as described in #887580: Upgrade failed from 2.x to 3.1 under PostGres.
Comment #4
quicksketchOkay looks like your patch is fine for Drupal 7, it's only Drupal 6 that needed any changes (since the upgrade path was the broken part in Drupal 6). I've committed your patch to D7 and this patch to D6.
Comment #5
quicksketchComment #6
quicksketchMarked #894596: Upgrade from 2.x to 3.2 fails under IIS 7 with MySQL 5.1.x as duplicate (see #3 for the explanation on why this was Windows-specific and why it's fixed with this patch).