[horde] PostgreSQL errors

Daniel A. Ramaley daniel.ramaley at DRAKE.EDU
Wed Mar 29 13:16:11 PST 2006


On Wednesday 29 March 2006 13:59, Jan Schneider wrote:
>Zitat von "Daniel A. Ramaley" <daniel.ramaley at DRAKE.EDU>:
>> Since upgrading to Horde 3.1 i've noticed regular error messages in
>> PostgreSQL's log:
>>
>> Mar 29 12:53:54 sun12 postgres[7205]: [1-1] ERROR:  relation
>> "horde_histories" does not exist
>>
>> Was there something that needed to be done to the database as part
>> of the upgrade? I noticed that there was an upgrade script in the
>> Horde 3.1 tarball (horde-3.1/scripts/upgrades/3.0_to_3.1.mysql.sql)
>> for the MySQL database, but none for PostgreSQL.
>
>Because noone contributed one. Patch?

That would explain it. What i've pasted below seems to work; since 
applying it and running "php move_history_out_of_datatree.php" i've 
stopped seeing errors in the log, and Horde still works. You may notice 
a remarkable similarity between what is below and the mysql upgrade 
script; all i did was remove the last line of the mysql script that 
sets permissions as postgresql didn't like the syntax and it didn't 
seem necessary (i applied the below while logged in to postgresql as 
horde).



ALTER TABLE horde_users ADD COLUMN user_soft_expiration_date INT;
ALTER TABLE horde_users ADD COLUMN user_hard_expiration_date INT;

CREATE TABLE horde_histories (
    history_id       BIGINT NOT NULL,
    object_uid       VARCHAR(255) NOT NULL,
    history_action   VARCHAR(32) NOT NULL,
    history_ts       BIGINT NOT NULL,
    history_desc     TEXT,
    history_who      VARCHAR(255),
    history_extra    TEXT,
--
    PRIMARY KEY (history_id)
);

CREATE INDEX history_action_idx ON horde_histories (history_action);
CREATE INDEX history_ts_idx ON horde_histories (history_ts);
CREATE INDEX history_uid_idx ON horde_histories (object_uid);



-- 
------------------------------------------------------------------------
Dan Ramaley                            Dial Center 118, Drake University
Network Programmer/Analyst             2407 Carpenter Ave
+1 515 271-4540                        Des Moines IA 50311 USA


More information about the horde mailing list