Commit 237778e1 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Fixed errors in postgres update script.


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10739 b35dd754-fafc-0310-a699-88a17e54d16e
parent 4b9a1283
......@@ -16,9 +16,12 @@ CREATE TABLE mucServiceProp (
);
-- add new indexed column to mucRoom
ALTER TABLE mucRoom ADD COLUMN serviceID INTEGER NOT NULL;
ALTER TABLE mucRoom ADD COLUMN serviceID INTEGER;
CREATE INDEX mucRoom_serviceid_idx ON mucRoom (serviceID);
-- update all entries in mucRoom to be set to the default conference service
UPDATE mucRoom set serviceID = 1;
-- change mucRoom primary key to be referenced around serviceID
ALTER TABLE mucRoom DROP CONSTRAINT mucRoom__pk;
ALTER TABLE mucRoom ADD CONSTRAINT mucRoom__pk PRIMARY KEY (serviceID, name);
......@@ -27,9 +30,6 @@ ALTER TABLE mucRoom ADD CONSTRAINT mucRoom__pk PRIMARY KEY (serviceID, name);
INSERT INTO mucService (serviceID, subdomain) VALUES (1, 'conference');
INSERT INTO jiveID (idType, id) VALUES (26, 1);
-- update all entries in mucRoom to be set to the default conference service
UPDATE mucRoom set serviceID = 1;
-- update conference name/desc if there is a custom one set
UPDATE mucService SET subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = 'xmpp.muc.service' )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = 'xmpp.muc.service' );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment