Commit 5ffe1c46 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Bugfix for postgres upgrade script.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10148 b35dd754-fafc-0310-a699-88a17e54d16e
parent c82f1100
......@@ -20,8 +20,8 @@ ALTER TABLE mucRoom ADD COLUMN serviceID INTEGER NOT NULL;
CREATE INDEX mucRm_serviceid_idx ON mucRoom (serviceID);
-- 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);
ALTER TABLE mucRoom DROP CONSTRAINT mucRoom__pk;
ALTER TABLE mucRoom ADD CONSTRAINT mucRoom__pk PRIMARY KEY (serviceID, name);
-- add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, 'conference');
......@@ -31,11 +31,11 @@ INSERT INTO jiveID (idType, id) VALUES (26, 1);
UPDATE mucRoom set serviceID = 1;
-- update conference name/desc if there is a custom one set
UPDATE mucService SET mucService.subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = 'xmpp.muc.service' )
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' );
DELETE FROM jiveProperty WHERE name = 'xmpp.muc.service';
UPDATE mucService SET mucService.description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = 'muc.service-name' )
UPDATE mucService SET description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = 'muc.service-name' )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = 'muc.service-name' );
DELETE FROM jiveProperty WHERE name = 'muc.service-name';
......
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