PostgreSQL support in update scripts
Narno - April 16, 2008 - 18:44
| Project: | FeedAPI |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Update #9
* Failed: ALTER TABLE {feedapi} ADD skip SMALLINT NOT NULL DEFAULT '0'
* Failed: CREATE INDEX {feedapi}_skip_idx ON {feedapi} (skip)Update #10
* Failed: ALTER TABLE {feedapi} ALTER COLUMN url TYPE text, ALTER COLUMN link TYPE text

#1
I did not tested following codes. Just copied and pasted from system.install file.
<?php$ret[] = update_sql("ALTER TABLE {feedapi} ADD skip SMALLINT NOT NULL DEFAULT '0'");
?>
can be implemented as
<?phpdb_add_column($ret, 'feedapi', 'skip', 'smallint', array('not null' => TRUE, 'default' => 0));
?>
and
<?php$ret[] = update_sql("ALTER TABLE {feedapi}
ALTER COLUMN url TYPE text,
ALTER COLUMN link TYPE text");
?>
can be implemented as
<?phpdb_change_column($ret, 'feedapi', 'url', 'url', 'text', array('default' => "", 'not null' => TRUE));
db_change_column($ret, 'feedapi', 'link', 'link', 'text', array('default' => "", 'not null' => TRUE));
?>
#2
#3
Well, what is the version of the postgresql that you use?
I tested all of my install scripts with this:
[aaron@vonat ~]$ psql --versionpsql (PostgreSQL) 8.2.7
I read at the http://drupal.org/requirements page that i should rely on "PostgreSQL 7.4 or higher".
#4
I use PostgreSQL 7.4.16 :-)
#5
Narno:
I committed what mustafau suggested. Please try it out and if you still experience nonsense, please reopen the ticket.
#6
Automatically closed -- issue fixed for two weeks with no activity.