When I install this module I get this mistake. I've run update.php and reinstalled MySQL to the newest version! It didn't help.

# ser warning: BLOB/TEXT column 'body' can't have a default value query: CREATE TABLE abuse ( `aid` INT unsigned NOT NULL auto_increment, `oid` INT unsigned NOT NULL, `type` VARCHAR(128) NOT NULL DEFAULT 'node', `uid` INT unsigned NOT NULL DEFAULT 0, `name` VARCHAR(255) NOT NULL DEFAULT '', `mail` VARCHAR(255) NOT NULL DEFAULT '', `reason` VARCHAR(255) NOT NULL DEFAULT '', `body` TEXT NOT NULL DEFAULT '', `valid` MEDIUMINT unsigned NOT NULL DEFAULT 0, `created` INT unsigned NOT NULL, PRIMARY KEY (aid), INDEX oid_type (oid, type), INDEX uid (uid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in D:\htdocs\includes\database.inc on line 515.
# user warning: BLOB/TEXT column 'description' can't have a default value query: CREATE TABLE abuse_reasons ( `arid` INT unsigned NOT NULL auto_increment, `reason` VARCHAR(255) NOT NULL DEFAULT 'other', `description` MEDIUMTEXT NOT NULL DEFAULT '', `argumentation` MEDIUMTEXT NOT NULL DEFAULT '', PRIMARY KEY (arid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in D:\htdocs\includes\database.inc on line 515.
# user warning: Table 'yoservice.abuse_reasons' doesn't exist query: INSERT INTO abuse_reasons (reason, description, argumentation) VALUES ('foul language', 'The user wrote very mean things', 'Please refrain from writing such mean things') in D:\htdocs\sites\all\modules\abuse\abuse.install on line 277.
# user warning: Table 'yoservice.abuse_reasons' doesn't exist query: INSERT INTO abuse_reasons (reason, description, argumentation) VALUES ('adult themes', 'The user\'s wrote very explicit language', 'Please refrain from writing such mean things') in D:\htdocs\sites\all\modules\abuse\abuse.install on line 278.
# user warning: Table 'yoservice.abuse_reasons' doesn't exist query: INSERT INTO abuse_reasons (reason, description, argumentation) VALUES ('racist or sexist language', 'The user wrote very derogatory comments', 'Please refrain from writing such mean things') in D:\htdocs\sites\all\modules\abuse\abuse.install on line 279.
# user warning: Table 'yoservice.abuse_reasons' doesn't exist query: INSERT INTO abuse_reasons (reason, description, argumentation) VALUES ('contains private information', 'The user wrote about private information', 'Please refrain from writing such mean things') in D:\htdocs\sites\all\modules\abuse\abuse.install on line 280.
# user warning: Table 'yoservice.abuse_reasons' doesn't exist query: INSERT INTO abuse_reasons (reason, description, argumentation) VALUES ('other', 'The user wrote about other types of mean things', 'Please refrain from writing such mean things') in D:\htdocs\sites\all\modules\abuse\abuse.install on line 281.

CommentFileSizeAuthor
#1 abuse.install.patch1.04 KBjaydub

Comments

jaydub’s picture

StatusFileSize
new1.04 KB

as per the schema API docs: http://drupal.org/node/146939 BLOB and TEXT column types cannot have default values defined in the schema.

'default': The field's default value. The PHP type of the value matters: '', '0', and 0 are all different. If you specify '0' as the default value for a type 'int' field it will not work because '0' is a string containing the character "zero", not an integer.

Note that type 'text' and 'blob' fields cannot have default values.

See http://drupal.org/node/159333

Now when I install on MySQL with the defaults as defined in abuse.install it installs fine perhaps because core Drupal 6 now knows to remove the defaults for TEXT columns defined in a schema *shrug*

anyways here is a patch to remove the defaults for the TEXT columns.

gleb1982’s picture

Thanks!

btmash’s picture

Very strange that no one else had this error...I'll add the patch in to the install file.

btmash’s picture

Status: Active » Fixed

I've committed the patch - should be released by tomorrow.

gleb1982’s picture

Yes and all other modules work fine... after patching "abuse" also began to work :))).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.