Commit b2bd83db authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Modified jiveVCard structure. JM-338


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1650 b35dd754-fafc-0310-a699-88a17e54d16e
parent 499e84c7
......@@ -65,9 +65,8 @@ CREATE INDEX jiveRoGrps_rid_idx ON jiveRosterGroups (rosterID ASC);
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(2000) NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username, name)
value LONG VARCHAR NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
......
......@@ -65,9 +65,8 @@ CREATE INDEX jiveRosterGroup_rosterid_idx ON jiveRosterGroups (rosterID);
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username, name)
value LONGVARCHAR NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
......
......@@ -79,9 +79,8 @@ CREATE TABLE jiveRosterGroups (
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (username, name)
value TEXT NOT NULL,
PRIMARY KEY (username)
);
CREATE TABLE jiveID (
......
......@@ -66,9 +66,8 @@ ALTER TABLE jiveRosterGroups ADD CONSTRAINT jiveRosterGroups_rosterID_fk FOREIGN
CREATE TABLE jiveVCard (
username VARCHAR2(32) NOT NULL,
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(4000) NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username, name)
value LONG NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username)
);
CREATE TABLE jiveGroup (
......
......@@ -68,9 +68,8 @@ ALTER TABLE jiveRosterGroups ADD CONSTRAINT jiveRosterGroups_rosterID_fk FOREIGN
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username, name)
value TEXT NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
......
......@@ -66,9 +66,8 @@ ALTER TABLE jiveRosterGroups ADD CONSTRAINT jiveRosterGroups_rosterID_fk FOREIGN
CREATE TABLE jiveVCard (
username NVARCHAR(32) NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue NVARCHAR(2000) NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username, name)
value NTEXT NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username)
);
......
......@@ -37,3 +37,11 @@ ALTER TABLE mucRoom ADD COLUMN canChangeNick INTEGER NOT NULL;
ALTER TABLE mucRoom ADD COLUMN canRegister INTEGER NOT NULL;
UPDATE mucRoom set useReservedNick=0, canChangeNick=1, canRegister=1;
-- jiveVCard: Recreate table from scratch
DROP TABLE jiveVCard;
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
value LONG VARCHAR NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
......@@ -34,4 +34,12 @@ CREATE TABLE mucRoomProp (
// mucRoom: Add new columns: "useReservedNick", "canChangeNick" and "canRegister".
ALTER TABLE mucRoom ADD COLUMN useReservedNick INTEGER DEFAULT 0 NOT NULL;
ALTER TABLE mucRoom ADD COLUMN canChangeNick INTEGER DEFAULT 1 NOT NULL;
ALTER TABLE mucRoom ADD COLUMN canRegister INTEGER DEFAULT 1 NOT NULL;
\ No newline at end of file
ALTER TABLE mucRoom ADD COLUMN canRegister INTEGER DEFAULT 1 NOT NULL;
// jiveVCard: Recreate table from scratch
DROP TABLE jiveVCard;
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
value LONGVARCHAR NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
......@@ -37,3 +37,11 @@ ALTER TABLE mucRoom ADD COLUMN canChangeNick TINYINT NOT NULL;
ALTER TABLE mucRoom ADD COLUMN canRegister TINYINT NOT NULL;
UPDATE mucRoom set useReservedNick=0, canChangeNick=1, canRegister=1;
# jiveVCard: Recreate table from scratch
DROP TABLE jiveVCard;
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
value TEXT NOT NULL,
PRIMARY KEY (username)
);
\ No newline at end of file
......@@ -37,3 +37,11 @@ ALTER TABLE mucRoom ADD canChangeNick INTEGER NOT NULL;
ALTER TABLE mucRoom ADD canRegister INTEGER NOT NULL;
UPDATE mucRoom set useReservedNick=0, canChangeNick=1, canRegister=1;
REM // jiveVCard: Recreate table from scratch
DROP TABLE jiveVCard;
CREATE TABLE jiveVCard (
username VARCHAR2(32) NOT NULL,
value LONG NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username)
);
......@@ -37,3 +37,11 @@ ALTER TABLE mucRoom ADD COLUMN canChangeNick INTEGER NOT NULL;
ALTER TABLE mucRoom ADD COLUMN canRegister INTEGER NOT NULL;
UPDATE mucRoom set useReservedNick=0, canChangeNick=1, canRegister=1;
-- jiveVCard: Recreate table from scratch
DROP TABLE jiveVCard;
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
value TEXT NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
......@@ -37,3 +37,11 @@ ALTER TABLE mucRoom ADD canChangeNick INT NOT NULL;
ALTER TABLE mucRoom ADD canRegister INT NOT NULL;
UPDATE mucRoom set useReservedNick=0, canChangeNick=1, canRegister=1;
/* jiveVCard: Recreate table from scratch */
DROP TABLE jiveVCard;
CREATE TABLE jiveVCard (
username NVARCHAR(32) NOT NULL,
value NTEXT NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username)
);
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