Userpoints causes an error when installing on postgres.
Here's the correct code for postgresql in userpoints.install
case 'pgsql':
db_query("CREATE TABLE {userpoints} (
pid SERIAL,
uid SERIAL,
points INTEGER NOT NULL default '0',
max_points INTEGER NOT NULL default '0',
last_update INTEGER NOT NULL default '0',
tid INTEGER NOT NULL default '0',
PRIMARY KEY (pid)
);");
db_query("CREATE INDEX {userpoints}_last_update_idx ON {userpoints} (last_update)");
db_query("CREATE INDEX {userpoints}_tid_idx ON {userpoints} (tid)");
db_query("CREATE TABLE {userpoints_txn} (
txn_id SERIAL,
uid INTEGER NOT NULL default '0',
approver_uid INTEGER NOT NULL default '0',
points INTEGER NOT NULL default '0',
time_stamp INTEGER NOT NULL default '0',
status INTEGER NOT NULL default '0',
expirydate INTEGER NOT NULL default '0',
expired BOOLEAN,
parent_txn_id INTEGER NOT NULL default '0',
tid INTEGER NOT NULL DEFAULT '0',
entity_id INTEGER NULL DEFAULT NULL,
entity_type VARCHAR DEFAULT NULL,
operation VARCHAR,
reference VARCHAR,
description VARCHAR,
PRIMARY KEY (txn_id)
);");
db_query("CREATE INDEX {userpoints_txn}_status_idx ON {userpoints_txn} (status)");
db_query("CREATE INDEX {userpoints_txn}_operation_idx ON {userpoints_txn} (operation)");
db_query("CREATE INDEX {userpoints_txn}_reference_idx ON {userpoints_txn} (reference)");
break;
hth,
DT
Comments
Comment #1
kbahey commentedCan you please create a proper patch against the cvs tag DRUPAL-5--3 ?
See http://drupal.org/patch for details.
Comment #2
berdirSorry for spamming the participants in this issue. Due to the release of Drupal 7 and the lack of time from the maintainers, I'm closing all remaining 5.x issues for Userpoints.
Feel free to re-open this issue or create a new one for 6.x or even better 7.x if this bug is still open or feature is missing for these versions.