I got the following errors when trying to install the Activity Stream core module:
* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "lastfetch" is of type timestamp without time zone but default expression is of type integer HINT: You will need to rewrite or cast the expression. in /usr/share/php/drupal/includes/database.pgsql.inc on line 139.
* user warning: query: CREATE TABLE activitystream_accounts ( uid int_unsigned NOT NULL default 0, module varchar(255), userid varchar(255), password varchar(255), feed varchar(255), lastfetch timestamp without time zone NOT NULL default 0 ) in /usr/share/php/drupal/includes/database.inc on line 515.
To fix this in a database-agnostic way, I would recommend changing the default to an actual date/time value that is recognizable by both mysql and postgres, such as the epoch+1 second: "1970-01-01 00:00:01"
Attaching a patch to do exactly that.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | activitystream.install.patch | 1 KB | bderrly |
| activitystream.install.patch | 1006 bytes | Anonymous (not verified) |
Comments
Comment #1
akalsey commentedCan anyone review this and ensure this fixes Postgres?
Comment #2
bderrly commentedI just tested the patch on an install of 6.x-1.0-rc2 and it worked. Thanks for the patch curtis.
Comment #3
bderrly commentedActually, after some errors I've found a spelling error in the original code that wasn't caught in with the patch either.
Comment #4
akalsey commentedThe move to the schema system and away from SQL queries should have fixed this.