The mollom.install file uses a SQL query that does now work for Postgres as you can't define indexes inline. A separate query is needed to create the index on the the session column. The patch attached resolves this, but I will include the complete changed function below:
/**
* Implementation of hook_install().
*/
function mollom_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {mollom} (
did varchar(255) NOT NULL default '',
session varchar(255) NOT NULL default '',
quality varchar(255) NOT NULL default '',
PRIMARY KEY (did),
INDEX (session)
);");
break;
case 'pgsql':
db_query("CREATE TABLE {mollom} (
did varchar(255) NOT NULL default '',
session varchar(255) NOT NULL default '',
quality varchar(255) NOT NULL default '',
PRIMARY KEY (did)
);");
db_query("CREATE INDEX {mollom}_session_idx ON {mollom} (session);");
break;
}
}
This only affects the Drupal 5 versions of the module.
| Comment | File | Size | Author |
|---|---|---|---|
| mollom.install.patch.txt | 1.06 KB | stormsweeper |
Comments
Comment #1
stormsweeper commentedI forgot to set the status when I created this issue.
Comment #2
dries commentedGreat -- I've committed this to the Drupal 5 branch and I'll roll a new release the next couple of days. Thanks Stormsweeper.
Comment #3
dries commentedComment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.