Commit 79758aaf authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Fixed ordering of primary key changes.


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10078 b35dd754-fafc-0310-a699-88a17e54d16e
parent 48cc69f3
-- change mucRoom's 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);
-- create table mucService
CREATE TABLE mucService (
serviceID INTEGER NOT NULL,
......@@ -23,6 +19,10 @@ CREATE TABLE mucServiceProp (
ALTER TABLE mucRoom ADD COLUMN serviceID INTEGER NOT NULL;
CREATE INDEX mucRm_serviceid_idx ON mucRoom (serviceID);
-- change mucRoom's 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);
-- add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
......
// change mucRoom's 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);
// create table mucService
CREATE TABLE mucService (
serviceID BIGINT NOT NULL,
......@@ -23,6 +19,10 @@ CREATE TABLE mucServiceProp (
ALTER TABLE mucRoom ADD COLUMN serviceID BIGINT NOT NULL BEFORE roomID;
CREATE INDEX mucRoom_serviceid_idx ON mucRoom(serviceID);
// change mucRoom's 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);
// add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
......
# change mucRoom's primary key to be referenced around serviceID
ALTER TABLE mucRoom DROP PRIMARY KEY;
ALTER TABLE mucRoom ADD PRIMARY KEY (serviceID,name);
# create table mucService
CREATE TABLE mucService (
serviceID BIGINT NOT NULL,
......@@ -23,6 +19,10 @@ CREATE TABLE mucServiceProp (
ALTER TABLE mucRoom ADD COLUMN serviceID BIGINT NOT NULL FIRST;
ALTER TABLE mucRoom ADD INDEX mucRoom_serviceid_idx (serviceID);
# change mucRoom's primary key to be referenced around serviceID
ALTER TABLE mucRoom DROP PRIMARY KEY;
ALTER TABLE mucRoom ADD PRIMARY KEY (serviceID,name);
# add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
......
-- change mucRoom's 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);
-- create table mucService
CREATE TABLE mucService (
serviceID INT NOT NULL,
......@@ -23,6 +19,10 @@ CREATE TABLE mucServiceProp (
ALTER TABLE mucRoom ADD COLUMN serviceID INT NOT NULL;
CREATE INDEX mucRm_serviceid_idx ON mucRoom (serviceID);
-- change mucRoom's 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);
-- add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
......
-- change mucRoom's 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);
-- create table mucService
CREATE TABLE mucService (
serviceID INTEGER NOT NULL,
......@@ -23,6 +19,10 @@ CREATE TABLE mucServiceProp (
ALTER TABLE mucRoom ADD COLUMN serviceID INTEGER NOT NULL;
CREATE INDEX mucRm_serviceid_idx ON mucRoom (serviceID);
-- change mucRoom's 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);
-- add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
......
/* change mucRoom's 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);
/* create table mucService */
CREATE TABLE mucService (
serviceID INT NOT NULL,
......@@ -23,6 +19,10 @@ CREATE TABLE mucServiceProp (
ALTER TABLE mucRoom ADD COLUMN serviceID INT NOT NULL;
CREATE INDEX mucRoom_serviceid_idx ON mucRoom(serviceID);
/* change mucRoom's 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);
/* add default entry for conference service and associated jiveID value */
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
......
/* change mucRoom's 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);
/* create table mucService */
CREATE TABLE mucService (
serviceID INT NOT NULL,
......@@ -23,6 +19,10 @@ CREATE TABLE mucServiceProp (
ALTER TABLE mucRoom ADD COLUMN serviceID INT NOT NULL;
CREATE INDEX mucRoom_serviceid_idx ON mucRoom(serviceID);
/* change mucRoom's 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);
/* add default entry for conference service and associated jiveID value */
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
......
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