When installing, support_nag gave me an error message because "text" columns (used for the message field) cannot have default values:
http://dev.mysql.com/doc/refman/5.0/en/blob.html
I took the install schema and wrote it into sql and manually created the table, removing the "default" statement for the message field.
create table support_nags (
nagid serial not null,
action int unsigned not null default '0',
clients varchar (255) not null default '',
states varchar (255) not null default '',
priorities varchar (255) not null default '',
assigned varchar (255) not null default '',
mailto varchar (255) not null default '',
subject varchar (128) not null default '',
message text not null,
frequency int unsigned not null default '0',
last int unsigned not null default '0',
count int unsigned not null default '0',
primary key (nagid),
);
I also had a problem with the nagid field. I could not create the table with "unsigned" included in the create statement. I don't know why. I removed "unsigned" and the table was created. I know that "SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE."
http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
I hope you find any of this helpful. If I have missed something (which is perfectly possible..heck, it's likely!), I'd be happy to learn.
mrweaver
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | message-default-causes-create-table-error-964912-3.patch | 717 bytes | hkovacs |
Comments
Comment #1
rsevero commentedMoving to the "Support Nag" project.
Comment #2
hkovacs commentedI changed the title to be more user friendly. I changed the version to 7 since 6 is going EOL and I have this problem on 7.
The error occurs when enabling the module:
WD php: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'message' can't have a default value: [error]
CREATE TABLE {support_nags}.......
A nice explanation about this being a mysql failure can be found here http://stackoverflow.com/questions/3466872/why-cant-a-text-column-have-a...
In support_nag.install, I commented line 75 message 'default'.
Enable module is now successful.
I can roll a patch over the weekend. Right now I just wanted to get this installed.
HTH
Comment #3
hkovacs commentedHere's the patch. HTH
Comment #5
jeremy commentedThanks! Rather than comment it out I deleted it. Applied:
http://cgit.drupalcode.org/support_nag/commit/?id=fadfce9
Comment #6
hkovacs commentedYeah, I don't like to step on the maintainers toes, so I just commented it out. Deletion is much better.
Thanks for committing it.