Commit 6b818db3 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Changing name to Wildfire (initial work).

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@3196 b35dd754-fafc-0310-a699-88a17e54d16e
parent a77b766d
This diff is collapsed.
#!/bin/sh
# jive-messengerd
#
# chkconfig: 2345 20 80
# description: Used to start and stop the jive messenger XMPP server
#
# Script used to start jive messenger as daemon
# The script has currently been tested on Redhat Fedora Core 3,
# but should theoretically work on most UNIX like systems
#
# before running this script make sure $MESSENGER_HOME/bin/messenger is
# executable by the user you want to run messenger as
# (chmod +x $MESSENGER_HOME/bin/messenger)
#
# This script should be copied into /etc/init.d and linked into
# your default runlevel directory.
# You can find your default runlevel directory by typing:
# grep default /etc/inittab
#
# Link to the directory like follows
# cd /etc/rc<num>.d
# ln -s ../init.d/jive-messengerd $90jive-messengerd
#
# Set this to tell this script where messenger lives
# If this is not set the script will look for /opt/jive_messenger, then /usr/local/jive_messenger
#export MESSENGER_HOME=
# If there is a different user you would like to run this script as,
# change the following line
export MESSENGER_USER=jive
# -----------------------------------------------------------------
# If a messenger home variable has not been specified, try to determine it
if [ ! $MESSENGER_HOME ]; then
if [ -d "/opt/jive_messenger" ]; then
MESSENGER_HOME="/opt/jive_messenger"
elif [ -d "/usr/local/jive_messenger" ]; then
MESSENGER_HOME="/usr/local/jive_messenger"
else
echo "Could not find Jive Messenger installation under /opt or /usr/local"
echo "Please specify the Jive Messenger installation location in environment variable MESSENGER_HOME"
exit 1
fi
fi
function execCommand() {
OLD_PWD=`pwd`
cd $MESSENGER_HOME/bin
CMD="./messenger $1"
su -c "$CMD" $MESSENGER_USER &
cd $OLD_PWD
}
start() {
execCommand "start"
}
stop() {
execCommand "stop"
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage $0 {start|stop}"
exit 1
esac
exit 0
@echo off
REM #
REM # $RCSfile$
REM # $Revision$
REM # $Date$
REM #
if "%JAVA_HOME%" == "" goto javaerror
if not exist "%JAVA_HOME%\bin\java.exe" goto javaerror
goto run
:javaerror
echo.
echo Error: JAVA_HOME environment variable not set, Jive Messenger not started.
echo.
goto end
:run
if "%1" == "-debug" goto debug
start "Jive Messenger" "%JAVA_HOME%\bin\java" -server -jar ..\lib\startup.jar
goto end
:debug
start "Jive Messenger" "%JAVA_HOME%\bin\java" -Xdebug -Xint -server -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -jar ..\lib\startup.jar
goto end
:end
#!/bin/sh
#
# $RCSfile$
# $Revision$
# $Date$
#
# tries to determine arguments to launch messenger
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
Darwin*) darwin=true
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
fi
;;
esac
#if messenger home is not set or is not a directory
if [ -z "$MESSENGER_HOME" -o ! -d "$MESSENGER_HOME" ]; then
if [ -d /opt/messenger ] ; then
MESSENGER_HOME="/opt/messenger"
fi
if [ -d /usr/local/messenger ] ; then
MESSENGER_HOME="/usr/local/messenger"
fi
if [ -d ${HOME}/opt/messenger ] ; then
MESSENGER_HOME="${HOME}/opt/messenger"
fi
#resolve links - $0 may be a link in messenger's home
PRG="0"
progname=`basename "$0$"`
# need this for relative symlinks
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
#assumes we are in the bin directory
MESSENGER_HOME=`dirname "$PRG"`/..
#make it fully qualified
MESSENGER_HOME=`cd "$MESSENGER_HOME" && pwd`
fi
MESSENGER_OPTS="${MESSENGER_OPTS} -DmessengerHome=${MESSENGER_HOME}"
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$MESSENGER_HOME" ] &&
MESSENGER_HOME=`cygpath --unix "$MESSENGER_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
#set the MESSENGER_LIB location
MESSENGER_LIB="${MESSENGER_HOME}/lib"
MESSENGER_OPTS="${MESSENGER_OPTS} -Dmessenger.lib.dir=${MESSENGER_LIB}"
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD=`which java 2> /dev/null `
if [ -z "$JAVACMD" ] ; then
JAVACMD=java
fi
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
exit 1
fi
if [ -z "$LOCALCLASSPATH" ] ; then
LOCALCLASSPATH=$MESSENGER_LIB/startup.jar
else
LOCALCLASSPATH=$MESSENGER_LIB/startup.jar:$LOCALCLASSPATH
fi
# For Cygwin, switch paths to appropriate format before running java
if $cygwin; then
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
format=mixed
else
format=windows
fi
MESSENGER_HOME=`cygpath --$format "$MESSENGER_HOME"`
MESSENGER_LIB=`cygpath --$format "$MESSENGER_LIB"`
JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
LOCALCLASSPATH=`cygpath --path --$format "$LOCALCLASSPATH"`
if [ -n "$CLASSPATH" ] ; then
CLASSPATH=`cygpath --path --$format "$CLASSPATH"`
fi
CYGHOME=`cygpath --$format "$HOME"`
fi
# add a second backslash to variables terminated by a backslash under cygwin
if $cygwin; then
case "$MESSENGER_HOME" in
*\\ )
MESSENGER_HOME="$MESSENGER_HOME\\"
;;
esac
case "$CYGHOME" in
*\\ )
CYGHOME="$CYGHOME\\"
;;
esac
case "$LOCALCLASSPATH" in
*\\ )
LOCALCLASSPATH="$LOCALCLASSPATH\\"
;;
esac
case "$CLASSPATH" in
*\\ )
CLASSPATH="$CLASSPATH\\"
;;
esac
fi
messenger_exec_command="exec \"$JAVACMD\" -server $MESSENGER_OPTS -classpath \"$LOCALCLASSPATH\" -jar \"$MESSENGER_LIB\"/startup.jar"
eval $messenger_exec_command
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file stores bootstrap properties needed by Jive Messenger.
Property names must be in the format: "prop.name.is.blah=value"
That will be stored as:
<prop>
<name>
<is>
<blah>value</blah>
</is>
</name>
</prop>
Most properties are stored in the Jive Messenger database. A
property viewer and editor is included in the admin console.
-->
<!-- root element, all properties must be under this element -->
<jive>
<adminConsole>
<!-- Disable either port by setting the value to -1 -->
<port>9090</port>
<securePort>9091</securePort>
</adminConsole>
<admin>
<!-- Use this section to define users that will have admin privileges. Below,
you will find two ways to specify which users are admins. Admins will
have access to the admin console (only local users) and may have also access
to other functionalities like ad-hoc commands. -->
<!-- By default, only the user with the username "admin" can login
to the admin console. Alternatively, you can specify a comma-delimitted
list usernames that should be authorized to login to the admin console
by setting the <authorizedUsernames> field below. -->
<!-- <authorizedUsernames></authorizedUsernames> -->
<!-- Comma-delimitted list of bare JIDs. The JIDs may belong to local
or remote users. -->
<!-- <authorizedJIDs></authorizedJIDs> -->
</admin>
<locale>en</locale>
<!-- Example LDAP settings -->
<!--
<ldap>
<host></host>
<port>389</port>
<usernameField>uid</usernameField>
<nameField>cn</nameField>
<emailField>mail</emailField>
<baseDN></baseDN>
<adminDN></adminDN>
<adminPassword></adminPassword>
</ldap>
<provider>
<user>
<className>org.jivesoftware.messenger.ldap.LdapUserProvider</className>
</user>
<auth>
<className>org.jivesoftware.messenger.ldap.LdapAuthProvider</className>
</auth>
</provider>
-->
<!-- End example LDAP settings -->
</jive>
\ No newline at end of file
-- $RCSfile$
-- $Revision$
-- $Date$
CREATE TABLE jiveUser (
username VARCHAR(32) NOT NULL,
password VARCHAR(32) NOT NULL,
name VARCHAR(100),
email VARCHAR(100),
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
CONSTRAINT jiveUser_pk PRIMARY KEY (username)
);
CREATE INDEX jiveUsr_cDate_idx ON jiveUser (creationDate ASC);
CREATE TABLE jiveUserProp (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(2000) NOT NULL,
CONSTRAINT jiveUsrProp_pk PRIMARY KEY (username, name)
);
CREATE TABLE jivePrivate (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
namespace VARCHAR(200) NOT NULL,
value LONG VARCHAR NOT NULL,
CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace)
);
CREATE TABLE jiveOffline (
username VARCHAR(32) NOT NULL,
messageID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
messageSize INTEGER NOT NULL,
message LONG VARCHAR NOT NULL,
CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID)
);
CREATE TABLE jiveRoster (
rosterID INTEGER NOT NULL,
username VARCHAR(32) NOT NULL,
jid VARCHAR(1000) NOT NULL,
sub INTEGER NOT NULL,
ask INTEGER NOT NULL,
recv INTEGER NOT NULL,
nick VARCHAR(255),
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
);
CREATE INDEX jiveR_userid_idx ON jiveRoster (username ASC);
CREATE TABLE jiveRosterGroups (
rosterID INTEGER NOT NULL,
rank INTEGER NOT NULL,
groupName VARCHAR(255) NOT NULL,
CONSTRAINT jiveRoGrps_pk PRIMARY KEY (rosterID, rank)
);
CREATE INDEX jiveRoGrps_rid_idx ON jiveRosterGroups (rosterID ASC);
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
value LONG VARCHAR NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
CREATE TABLE jiveGroup (
groupName VARCHAR(50) NOT NULL,
description VARCHAR(255),
CONSTRAINT jiveGroup_pk PRIMARY KEY (groupName)
);
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(2000) NOT NULL,
CONSTRAINT jiveGrpProp_pk PRIMARY KEY (groupName, name)
);
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGrpUser PRIMARY KEY (groupName, username, administrator)
);
CREATE TABLE jiveID (
idType INTEGER NOT NULL,
id INTEGER NOT NULL,
CONSTRAINT jiveID_pk PRIMARY KEY (idType)
);
CREATE TABLE jiveProperty (
name VARCHAR(100) NOT NULL,
propValue VARCHAR(3000) NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR(255) NOT NULL,
secret VARCHAR(255),
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
-- MUC tables
CREATE TABLE mucRoom (
roomID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR(50) NOT NULL,
naturalName VARCHAR(255) NOT NULL,
description VARCHAR(255),
lockedDate CHAR(15) NOT NULL,
emptyDate CHAR(15) NULL,
canChangeSubject INTEGER NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom INTEGER NOT NULL,
moderated INTEGER NOT NULL,
membersOnly INTEGER NOT NULL,
canInvite INTEGER NOT NULL,
password VARCHAR(50) NULL,
canDiscoverJID INTEGER NOT NULL,
logEnabled INTEGER NOT NULL,
subject VARCHAR(100) NULL,
rolesToBroadcast INTEGER NOT NULL,
useReservedNick INTEGER NOT NULL,
canChangeNick INTEGER NOT NULL,
canRegister INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomid_idx ON mucRoom (roomID);
CREATE TABLE mucRoomProp (
roomID INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(2000) NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
CREATE TABLE mucAffiliation (
roomID INTEGER NOT NULL,
jid VARCHAR(1000) NOT NULL,
affiliation INTEGER NOT NULL,
CONSTRAINT mucAffiliation_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucMember (
roomID INTEGER NOT NULL,
jid VARCHAR(1000) NOT NULL,
nickname VARCHAR(255) NULL,
firstName VARCHAR(100) NULL,
lastName VARCHAR(100) NULL,
url VARCHAR(100) NULL,
email VARCHAR(100) NULL,
faqentry VARCHAR(100) NULL,
CONSTRAINT mucMember_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucConversationLog (
roomID INTEGER NOT NULL,
sender VARCHAR(1000) NOT NULL,
nickname VARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR(255) NULL,
body CLOB NULL
);
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
-- Finally, insert default table values
INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 2);
-- Entry for admin user
INSERT INTO jiveUser (username, password, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
// $RCSfile$
// $Revision$
// $Date$
CREATE TABLE jiveUser (
username VARCHAR(32) NOT NULL,
password VARCHAR(32) NOT NULL,
name VARCHAR(100),
email VARCHAR(100),
creationDate VARCHAR(15) NOT NULL,
modificationDate VARCHAR(15) NOT NULL,
CONSTRAINT jiveUser_pk PRIMARY KEY (username)
);
CREATE INDEX jiveUser_cDate_idx ON jiveUser (creationDate);
CREATE TABLE jiveUserProp (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name)
);
CREATE TABLE jivePrivate (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
namespace VARCHAR(200) NOT NULL,
value LONGVARCHAR NOT NULL,
CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace)
);
CREATE TABLE jiveOffline (
username VARCHAR(32) NOT NULL,
messageID BIGINT NOT NULL,
creationDate VARCHAR(15) NOT NULL,
messageSize INTEGER NOT NULL,
message LONGVARCHAR NOT NULL,
CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID)
);
CREATE TABLE jiveRoster (
rosterID BIGINT NOT NULL,
username VARCHAR(32) NOT NULL,
jid VARCHAR(1024) NOT NULL,
sub INTEGER NOT NULL,
ask INTEGER NOT NULL,
recv INTEGER NOT NULL,
nick VARCHAR(255),
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
);
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username);
CREATE TABLE jiveRosterGroups (
rosterID BIGINT NOT NULL,
rank INTEGER NOT NULL,
groupName VARCHAR(255) NOT NULL,
CONSTRAINT jiveRosterGroups_pk PRIMARY KEY (rosterID, rank)
);
CREATE INDEX jiveRosterGroup_rosterid_idx ON jiveRosterGroups (rosterID);
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
value LONGVARCHAR NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
CREATE TABLE jiveGroup (
groupName VARCHAR(50) NOT NULL,
description VARCHAR(255),
CONSTRAINT jiveGroup_pk PRIMARY KEY (groupName)
);
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupName, username, administrator)
);
CREATE TABLE jiveID (
idType INTEGER NOT NULL,
id BIGINT NOT NULL,
CONSTRAINT jiveID_pk PRIMARY KEY (idType)
);
CREATE TABLE jiveProperty (
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR(255) NOT NULL,
secret VARCHAR(255),
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
// MUC Tables
CREATE TABLE mucRoom (
roomID BIGINT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR(50) NOT NULL,
naturalName VARCHAR(255) NOT NULL,
description VARCHAR(255),
lockedDate CHAR(15) NOT NULL,
emptyDate CHAR(15) NULL,
canChangeSubject INTEGER NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom INTEGER NOT NULL,
moderated INTEGER NOT NULL,
membersOnly INTEGER NOT NULL,
canInvite INTEGER NOT NULL,
password VARCHAR(50) NULL,
canDiscoverJID INTEGER NOT NULL,
logEnabled INTEGER NOT NULL,
subject VARCHAR(100) NULL,
rolesToBroadcast INTEGER NOT NULL,
useReservedNick INTEGER NOT NULL,
canChangeNick INTEGER NOT NULL,
canRegister INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomid_idx ON mucRoom(roomID);
CREATE TABLE mucRoomProp (
roomID BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
CREATE TABLE mucAffiliation (
roomID BIGINT NOT NULL,
jid VARCHAR(1024) NOT NULL,
affiliation INTEGER NOT NULL,
CONSTRAINT mucAffiliation_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucMember (
roomID BIGINT NOT NULL,
jid VARCHAR(1024) NOT NULL,
nickname VARCHAR(255) NULL,
firstName VARCHAR(100) NULL,
lastName VARCHAR(100) NULL,
url VARCHAR(100) NULL,
email VARCHAR(100) NULL,
faqentry VARCHAR(100) NULL,
CONSTRAINT mucMember_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucConversationLog (
roomID BIGINT NOT NULL,
sender VARCHAR(1024) NOT NULL,
nickname VARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR(255) NULL,
body LONGVARCHAR NULL
);
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
// Finally, insert default table values.
INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 2);
// Entry for admin user
INSERT INTO jiveUser (username, password, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
# $RCSfile$
# $Revision$
# $Date$
CREATE TABLE jiveUser (
username VARCHAR(32) NOT NULL,
password VARCHAR(32) NOT NULL,
name VARCHAR(100),
email VARCHAR(100),
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
PRIMARY KEY (username),
INDEX jiveUser_cDate_idx (creationDate)
);
CREATE TABLE jiveUserProp (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (username, name)
);
CREATE TABLE jiveGroup (
groupName VARCHAR(50) NOT NULL,
description VARCHAR(255),
PRIMARY KEY (groupName)
);
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (groupName, name)
);
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR(32) NOT NULL,
administrator TINYINT NOT NULL,
PRIMARY KEY (groupName, username, administrator)
);
CREATE TABLE jivePrivate (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
namespace VARCHAR(200) NOT NULL,
value TEXT NOT NULL,
PRIMARY KEY (username, name, namespace)
);
CREATE TABLE jiveOffline (
username VARCHAR(32) NOT NULL,
messageID BIGINT NOT NULL,
creationDate CHAR(15) NOT NULL,
messageSize INTEGER NOT NULL,
message TEXT NOT NULL,
PRIMARY KEY (username, messageID)
);
CREATE TABLE jiveRoster (
rosterID BIGINT NOT NULL,
username VARCHAR(32) NOT NULL,
jid TEXT NOT NULL,
sub TINYINT NOT NULL,
ask TINYINT NOT NULL,
recv TINYINT NOT NULL,
nick VARCHAR(255),
PRIMARY KEY (rosterID),
INDEX jiveRoster_unameid_idx (username)
);
CREATE TABLE jiveRosterGroups (
rosterID BIGINT NOT NULL,
rank TINYINT NOT NULL,
groupName VARCHAR(255) NOT NULL,
PRIMARY KEY (rosterID, rank),
INDEX jiveRosterGroup_rosterid_idx (rosterID)
);
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
value TEXT NOT NULL,
PRIMARY KEY (username)
);
CREATE TABLE jiveID (
idType INTEGER NOT NULL,
id BIGINT NOT NULL,
PRIMARY KEY (idType)
);
CREATE TABLE jiveProperty (
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (name)
);
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR(255) NOT NULL,
secret VARCHAR(255),
permission VARCHAR(10) NOT NULL,
PRIMARY KEY (subdomain)
);
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR(10) NOT NULL,
PRIMARY KEY (domain)
);
# MUC Tables
CREATE TABLE mucRoom (
roomID BIGINT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR(50) NOT NULL,
naturalName VARCHAR(255) NOT NULL,
description VARCHAR(255),
lockedDate CHAR(15) NOT NULL,
emptyDate CHAR(15) NULL,
canChangeSubject TINYINT NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom TINYINT NOT NULL,
moderated TINYINT NOT NULL,
membersOnly TINYINT NOT NULL,
canInvite TINYINT NOT NULL,
password VARCHAR(50) NULL,
canDiscoverJID TINYINT NOT NULL,
logEnabled TINYINT NOT NULL,
subject VARCHAR(100) NULL,
rolesToBroadcast TINYINT NOT NULL,
useReservedNick TINYINT NOT NULL,
canChangeNick TINYINT NOT NULL,
canRegister TINYINT NOT NULL,
PRIMARY KEY (name),
INDEX mucRoom_roomid_idx (roomID)
);
CREATE TABLE mucRoomProp (
roomID BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (roomID, name)
);
CREATE TABLE mucAffiliation (
roomID BIGINT NOT NULL,
jid TEXT NOT NULL,
affiliation TINYINT NOT NULL,
PRIMARY KEY (roomID,jid(70))
);
CREATE TABLE mucMember (
roomID BIGINT NOT NULL,
jid TEXT NOT NULL,
nickname VARCHAR(255) NULL,
firstName VARCHAR(100) NULL,
lastName VARCHAR(100) NULL,
url VARCHAR(100) NULL,
email VARCHAR(100) NULL,
faqentry VARCHAR(100) NULL,
PRIMARY KEY (roomID,jid(70))
);
CREATE TABLE mucConversationLog (
roomID BIGINT NOT NULL,
sender TEXT NOT NULL,
nickname VARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR(255) NULL,
body TEXT NULL,
INDEX mucLog_time_idx (time)
);
# Finally, insert default table values.
INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 2);
# Entry for admin user
INSERT INTO jiveUser (username, password, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
REM // $RCSfile$
REM // $Revision$
REM // $Date$
CREATE TABLE jiveUser (
username VARCHAR2(32) NOT NULL,
password VARCHAR2(32) NOT NULL,
name VARCHAR2(100),
email VARCHAR2(100),
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
CONSTRAINT jiveUser_pk PRIMARY KEY (username)
);
CREATE INDEX jiveUser_cDate_idx ON jiveUser (creationDate ASC);
CREATE TABLE jiveUserProp (
username VARCHAR2(32) NOT NULL,
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(1024) NOT NULL,
CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name)
);
CREATE TABLE jivePrivate (
username VARCHAR2(32) NOT NULL,
name VARCHAR2(100) NOT NULL,
namespace VARCHAR2(200) NOT NULL,
value LONG NOT NULL,
CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace)
);
CREATE TABLE jiveOffline (
username VARCHAR2(32) NOT NULL,
messageID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
messageSize INTEGER NOT NULL,
message LONG NOT NULL,
CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID)
);
CREATE TABLE jiveRoster (
rosterID INTEGER NOT NULL,
username VARCHAR2(32) NOT NULL,
jid VARCHAR2(1024) NOT NULL,
sub INTEGER NOT NULL,
ask INTEGER NOT NULL,
recv INTEGER NOT NULL,
nick VARCHAR2(255),
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
);
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC);
CREATE TABLE jiveRosterGroups (
rosterID INTEGER NOT NULL,
rank INTEGER NOT NULL,
groupName VARCHAR2(255) NOT NULL,
CONSTRAINT jiveRosterGroups_pk PRIMARY KEY (rosterID, rank)
);
CREATE INDEX jiveRosterGroup_rosterid_idx ON jiveRosterGroups (rosterID ASC);
ALTER TABLE jiveRosterGroups ADD CONSTRAINT jiveRosterGroups_rosterID_fk FOREIGN KEY (rosterID) REFERENCES jiveRoster INITIALLY DEFERRED DEFERRABLE;
CREATE TABLE jiveVCard (
username VARCHAR2(32) NOT NULL,
value LONG NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username)
);
CREATE TABLE jiveGroup (
groupName VARCHAR2(50) NOT NULL,
description VARCHAR2(255),
CONSTRAINT jiveGroup_pk PRIMARY KEY (groupName)
);
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(4000) NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR2(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser PRIMARY KEY (groupName, username, administrator)
);
CREATE TABLE jiveID (
idType INTEGER NOT NULL,
id INTEGER NOT NULL,
CONSTRAINT jiveID_pk PRIMARY KEY (idType)
);
CREATE TABLE jiveProperty (
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(4000) NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR2(255) NOT NULL,
secret VARCHAR2(255),
permission VARCHAR2(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR2(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR2(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
REM // MUC Tables
CREATE TABLE mucRoom(
roomID INT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR2(50) NOT NULL,
naturalName VARCHAR2(255) NOT NULL,
description VARCHAR2(255),
lockedDate CHAR(15) NOT NULL,
emptyDate CHAR(15) NULL,
canChangeSubject INTEGER NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom INTEGER NOT NULL,
moderated INTEGER NOT NULL,
membersOnly INTEGER NOT NULL,
canInvite INTEGER NOT NULL,
password VARCHAR2(50) NULL,
canDiscoverJID INTEGER NOT NULL,
logEnabled INTEGER NOT NULL,
subject VARCHAR2(100) NULL,
rolesToBroadcast INTEGER NOT NULL,
useReservedNick INTEGER NOT NULL,
canChangeNick INTEGER NOT NULL,
canRegister INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomid_idx ON mucRoom (roomID);
CREATE TABLE mucRoomProp (
roomID INT NOT NULL,
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(1024) NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
CREATE TABLE mucAffiliation (
roomID INT NOT NULL,
jid VARCHAR2(1024) NOT NULL,
affiliation INTEGER NOT NULL,
CONSTRAINT mucAffiliation_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucMember (
roomID INT NOT NULL,
jid VARCHAR2(1024) NOT NULL,
nickname VARCHAR2(255) NULL,
firstName VARCHAR2(100) NULL,
lastName VARCHAR2(100) NULL,
url VARCHAR2(100) NULL,
email VARCHAR2(100) NULL,
faqentry VARCHAR2(100) NULL,
CONSTRAINT mucMember_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucConversationLog (
roomID INT NOT NULL,
sender VARCHAR2(1024) NOT NULL,
nickname VARCHAR2(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR2(255) NULL,
body VARCHAR2(4000) NULL
);
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
REM // Finally, insert default table values.
INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 2);
REM // Entry for admin user
INSERT INTO jiveUser (username, password, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
-- $RCSfile$
-- $Revision$
-- $Date$
-- Note: This schema has only been tested on PostgreSQL 7.3.2.
CREATE TABLE jiveUser (
username VARCHAR(32) NOT NULL,
password VARCHAR(32) NOT NULL,
name VARCHAR(100),
email VARCHAR(100),
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
CONSTRAINT jiveUser_pk PRIMARY KEY (username)
);
CREATE INDEX jiveUser_cDate_idx ON jiveUser (creationDate);
CREATE TABLE jiveUserProp (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name)
);
CREATE TABLE jivePrivate (
username VARCHAR(32) NOT NULL,
name VARCHAR(100) NOT NULL,
namespace VARCHAR(200) NOT NULL,
value TEXT NOT NULL,
CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace)
);
CREATE TABLE jiveOffline (
username VARCHAR(32) NOT NULL,
messageID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
messageSize INTEGER NOT NULL,
message TEXT NOT NULL,
CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID)
);
CREATE TABLE jiveRoster (
rosterID INTEGER NOT NULL,
username VARCHAR(32) NOT NULL,
jid VARCHAR(1024) NOT NULL,
sub INTEGER NOT NULL,
ask INTEGER NOT NULL,
recv INTEGER NOT NULL,
nick VARCHAR(255),
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
);
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username);
CREATE TABLE jiveRosterGroups (
rosterID INTEGER NOT NULL,
rank INTEGER NOT NULL,
groupName VARCHAR(255) NOT NULL,
CONSTRAINT jiveRosterGroups_pk PRIMARY KEY (rosterID, rank)
);
CREATE INDEX jiveRosterGroups_rosterID_idx ON jiveRosterGroups (rosterID);
ALTER TABLE jiveRosterGroups ADD CONSTRAINT jiveRosterGroups_rosterID_fk FOREIGN KEY (rosterID) REFERENCES jiveRoster INITIALLY DEFERRED DEFERRABLE;
CREATE TABLE jiveVCard (
username VARCHAR(32) NOT NULL,
value TEXT NOT NULL,
CONSTRAINT jiveVCard_pk PRIMARY KEY (username)
);
CREATE TABLE jiveGroup (
groupName VARCHAR(50) NOT NULL,
description VARCHAR(255),
CONSTRAINT jiveGroup_pk PRIMARY KEY (groupName)
);
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupName, username, administrator)
);
CREATE TABLE jiveID (
idType INTEGER NOT NULL,
id INTEGER NOT NULL,
CONSTRAINT jiveID_pk PRIMARY KEY (idType)
);
CREATE TABLE jiveProperty (
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR(255) NOT NULL,
secret VARCHAR(255),
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
-- MUC Tables
CREATE TABLE mucRoom (
roomID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR(50) NOT NULL,
naturalName VARCHAR(255) NOT NULL,
description VARCHAR(255),
lockedDate CHAR(15) NOT NULL,
emptyDate CHAR(15) NULL,
canChangeSubject INTEGER NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom INTEGER NOT NULL,
moderated INTEGER NOT NULL,
membersOnly INTEGER NOT NULL,
canInvite INTEGER NOT NULL,
password VARCHAR(50) NULL,
canDiscoverJID INTEGER NOT NULL,
logEnabled INTEGER NOT NULL,
subject VARCHAR(100) NULL,
rolesToBroadcast INTEGER NOT NULL,
useReservedNick INTEGER NOT NULL,
canChangeNick INTEGER NOT NULL,
canRegister INTEGER NOT NULL,
CONSTRAINT mucRoom__pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomID_idx ON mucRoom(roomID);
CREATE TABLE mucRoomProp (
roomID INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
CREATE TABLE mucAffiliation (
roomID INTEGER NOT NULL,
jid VARCHAR(1024) NOT NULL,
affiliation INTEGER NOT NULL,
CONSTRAINT mucAffiliation__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucMember (
roomID INTEGER NOT NULL,
jid VARCHAR(1024) NOT NULL,
nickname VARCHAR(255) NULL,
firstName VARCHAR(100) NULL,
lastName VARCHAR(100) NULL,
url VARCHAR(100) NULL,
email VARCHAR(100) NULL,
faqentry VARCHAR(100) NULL,
CONSTRAINT mucMember__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucConversationLog (
roomID INTEGER NOT NULL,
sender VARCHAR(1024) NOT NULL,
nickname VARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR(255) NULL,
body TEXT NULL
);
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
-- Finally, insert default table values.
INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 2);
-- Entry for admin user
INSERT INTO jiveUser (username, password, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
/* $RCSfile$ */
/* $Revision$ */
/* $Date$ */
CREATE TABLE jiveUser (
username NVARCHAR(32) NOT NULL,
password NVARCHAR(32) NOT NULL,
name NVARCHAR(100),
email VARCHAR(100),
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
CONSTRAINT jiveUser_pk PRIMARY KEY (username)
);
CREATE INDEX jiveUser_cDate_idx ON jiveUser (creationDate ASC);
CREATE TABLE jiveUserProp (
username NVARCHAR(32) NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue NVARCHAR(2000) NOT NULL,
CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name)
);
CREATE TABLE jivePrivate (
username NVARCHAR(32) NOT NULL,
name NVARCHAR(100) NOT NULL,
namespace NVARCHAR(200) NOT NULL,
value NTEXT NOT NULL,
CONSTRAINT JivePrivate_pk PRIMARY KEY (username, name, namespace)
);
CREATE TABLE jiveOffline (
username NVARCHAR(32) NOT NULL,
messageID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
messageSize INTEGER NOT NULL,
message NTEXT NOT NULL,
CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID)
);
CREATE TABLE jiveRoster (
rosterID INTEGER NOT NULL,
username NVARCHAR(32) NOT NULL,
jid NVARCHAR(1024) NOT NULL,
sub INTEGER NOT NULL,
ask INTEGER NOT NULL,
recv INTEGER NOT NULL,
nick NVARCHAR(255),
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
);
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC);
CREATE TABLE jiveRosterGroups (
rosterID INTEGER NOT NULL,
rank INTEGER NOT NULL,
groupName NVARCHAR(255) NOT NULL,
CONSTRAINT jiveRosterGroups_pk PRIMARY KEY (rosterID, rank)
);
CREATE INDEX jiveRosterGroups_rosterid_idx ON jiveRosterGroups (rosterID ASC);
ALTER TABLE jiveRosterGroups ADD CONSTRAINT jiveRosterGroups_rosterID_fk FOREIGN KEY (rosterID) REFERENCES jiveRoster;
CREATE TABLE jiveVCard (
username NVARCHAR(32) NOT NULL,
value NTEXT NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username)
);
CREATE TABLE jiveGroup (
groupName NVARCHAR(50) NOT NULL,
description NVARCHAR(255),
CONSTRAINT group_pk PRIMARY KEY (groupName)
);
CREATE TABLE jiveGroupProp (
groupName NVARCHAR(50) NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue NVARCHAR(2000) NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
CREATE TABLE jiveGroupUser (
groupName NVARCHAR(50) NOT NULL,
username NVARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupName, username, administrator)
);
CREATE TABLE jiveID (
idType INTEGER NOT NULL,
id INTEGER NOT NULL,
CONSTRAINT jiveID_pk PRIMARY KEY (idType)
);
CREATE TABLE jiveProperty (
name NVARCHAR(100) NOT NULL,
propValue NTEXT NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
CREATE TABLE jiveExtComponentConf (
subdomain NVARCHAR(255) NOT NULL,
secret NVARCHAR(255),
permission NVARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
CREATE TABLE jiveRemoteServerConf (
domain NVARCHAR(255) NOT NULL,
remotePort INTEGER,
permission NVARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
/* MUC Tables */
CREATE TABLE mucRoom (
roomID INT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name NVARCHAR(50) NOT NULL,
naturalName NVARCHAR(255) NOT NULL,
description NVARCHAR(255),
lockedDate CHAR(15) NOT NULL,
emptyDate CHAR(15) NULL,
canChangeSubject INT NOT NULL,
maxUsers INT NOT NULL,
publicRoom INT NOT NULL,
moderated INT NOT NULL,
membersOnly INT NOT NULL,
canInvite INT NOT NULL,
password NVARCHAR(50) NULL,
canDiscoverJID INT NOT NULL,
logEnabled INT NOT NULL,
subject NVARCHAR(100) NULL,
rolesToBroadcast INT NOT NULL,
useReservedNick INT NOT NULL,
canChangeNick INT NOT NULL,
canRegister INT NOT NULL,
CONSTRAINT mucRoom__pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomID_idx on mucRoom(roomID);
CREATE TABLE mucRoomProp (
roomID INT NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue NVARCHAR(2000) NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
CREATE TABLE mucAffiliation (
roomID INT NOT NULL,
jid NVARCHAR(424) NOT NULL,
affiliation INT NOT NULL,
CONSTRAINT mucAffiliation__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucMember (
roomID INT NOT NULL,
jid NVARCHAR(424) NOT NULL,
nickname NVARCHAR(255) NULL,
firstName NVARCHAR(100) NULL,
lastName NVARCHAR(100) NULL,
url NVARCHAR(100) NULL,
email NVARCHAR(100) NULL,
faqentry NVARCHAR(100) NULL,
CONSTRAINT mucMember__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucConversationLog (
roomID INT NOT NULL,
sender NVARCHAR(1024) NOT NULL,
nickname NVARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject NVARCHAR(255) NULL,
body NTEXT NULL
);
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
/* Finally, insert default table values. */
INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 2);
/* Entry for admin user */
INSERT INTO jiveUser (username, password, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
/* $RCSfile$ */
/* $Revision: 1650 $ */
/* $Date: 2005-07-19 20:18:17 -0700 (Tue, 19 Jul 2005) $ */
CREATE TABLE jiveUser (
username NVARCHAR(32) NOT NULL,
password NVARCHAR(32) NOT NULL,
name NVARCHAR(100),
email VARCHAR(100),
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
CONSTRAINT jiveUser_pk PRIMARY KEY (username)
);
CREATE INDEX jiveUser_cDate_idx ON jiveUser (creationDate ASC);
CREATE TABLE jiveUserProp (
username NVARCHAR(32) NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name)
);
CREATE TABLE jivePrivate (
username NVARCHAR(32) NOT NULL,
name NVARCHAR(100) NOT NULL,
namespace NVARCHAR(200) NOT NULL,
value TEXT NOT NULL,
CONSTRAINT JivePrivate_pk PRIMARY KEY (username, name, namespace)
);
CREATE TABLE jiveOffline (
username NVARCHAR(32) NOT NULL,
messageID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
messageSize INTEGER NOT NULL,
message TEXT NOT NULL,
CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID)
);
CREATE TABLE jiveRoster (
rosterID INTEGER NOT NULL,
username NVARCHAR(32) NOT NULL,
jid TEXT NOT NULL,
sub INTEGER NOT NULL,
ask INTEGER NOT NULL,
recv INTEGER NOT NULL,
nick NVARCHAR(255),
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
);
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC);
CREATE TABLE jiveRosterGroups (
rosterID INTEGER NOT NULL,
rank INTEGER NOT NULL,
groupName NVARCHAR(255) NOT NULL,
CONSTRAINT jiveRosterGroups_pk PRIMARY KEY (rosterID, rank)
);
CREATE INDEX jiveRosterGroups_rosterid_idx ON jiveRosterGroups (rosterID ASC);
ALTER TABLE jiveRosterGroups ADD CONSTRAINT jiveRosterGroups_rosterID_fk FOREIGN KEY (rosterID) REFERENCES jiveRoster;
CREATE TABLE jiveVCard (
username NVARCHAR(32) NOT NULL,
value TEXT NOT NULL,
CONSTRAINT JiveVCard_pk PRIMARY KEY (username)
);
CREATE TABLE jiveGroup (
groupName NVARCHAR(50) NOT NULL,
description NVARCHAR(255),
CONSTRAINT group_pk PRIMARY KEY (groupName)
);
CREATE TABLE jiveGroupProp (
groupName NVARCHAR(50) NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
CREATE TABLE jiveGroupUser (
groupName NVARCHAR(50) NOT NULL,
username NVARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupName, username, administrator)
);
CREATE TABLE jiveID (
idType INTEGER NOT NULL,
id INTEGER NOT NULL,
CONSTRAINT jiveID_pk PRIMARY KEY (idType)
);
CREATE TABLE jiveProperty (
name NVARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
CREATE TABLE jiveExtComponentConf (
subdomain NVARCHAR(255) NOT NULL,
secret NVARCHAR(255),
permission NVARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
CREATE TABLE jiveRemoteServerConf (
domain NVARCHAR(255) NOT NULL,
remotePort INTEGER,
permission NVARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
/* MUC Tables */
CREATE TABLE mucRoom (
roomID INT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name NVARCHAR(50) NOT NULL,
naturalName NVARCHAR(255) NOT NULL,
description NVARCHAR(255),
lockedDate CHAR(15) NOT NULL,
emptyDate CHAR(15) NULL,
canChangeSubject INT NOT NULL,
maxUsers INT NOT NULL,
publicRoom INT NOT NULL,
moderated INT NOT NULL,
membersOnly INT NOT NULL,
canInvite INT NOT NULL,
password NVARCHAR(50) NULL,
canDiscoverJID INT NOT NULL,
logEnabled INT NOT NULL,
subject NVARCHAR(100) NULL,
rolesToBroadcast INT NOT NULL,
useReservedNick INT NOT NULL,
canChangeNick INT NOT NULL,
canRegister INT NOT NULL,
CONSTRAINT mucRoom__pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomID_idx on mucRoom(roomID);
CREATE TABLE mucRoomProp (
roomID INT NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
CREATE TABLE mucAffiliation (
roomID INT NOT NULL,
jid VARCHAR(255) NOT NULL,
affiliation INT NOT NULL,
CONSTRAINT mucAffiliation__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucMember (
roomID INT NOT NULL,
jid NVARCHAR(255) NOT NULL,
nickname NVARCHAR(255) NULL,
firstName NVARCHAR(100) NULL,
lastName NVARCHAR(100) NULL,
url NVARCHAR(100) NULL,
email NVARCHAR(100) NULL,
faqentry NVARCHAR(100) NULL,
CONSTRAINT mucMember__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucConversationLog (
roomID INT NOT NULL,
sender TEXT NOT NULL,
nickname NVARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject NVARCHAR(255) NULL,
body TEXT NULL
);
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
/* Finally, insert default table values. */
INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 2);
/* Entry for admin user */
INSERT INTO jiveUser (username, password, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
-- $RCSfile$
-- $Revision$
-- $Date$
-- upgrades from Messenger 1.1.x to 2.0.x
-- jiveUser: Adds new column "username". Removes "nameVisible" & "emailVisible". Changes primary key
ALTER TABLE jiveUser ADD COLUMN username VARCHAR(32) NOT NULL;
ALTER TABLE jiveUser DROP COLUMN nameVisible;
ALTER TABLE jiveUser DROP COLUMN emailVisible;
UPDATE jiveUser,jiveUserID SET jiveUser.username = jiveUserID.username where jiveUserID.objectID = jiveUser.userID;
ALTER TABLE jiveUser DROP PRIMARY KEY;
ALTER TABLE jiveUser ADD CONSTRAINT jiveUser_pk PRIMARY KEY (username);
-- jiveUserProp: Adds new column "username". Changes primary key
ALTER TABLE jiveUserProp ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveUserProp,jiveUser SET jiveUserProp.username = jiveUser.username where jiveUserProp.userID = jiveUser.userID;
ALTER TABLE jiveUserProp DROP PRIMARY KEY;
ALTER TABLE jiveUserProp ADD CONSTRAINT jiveUsrProp_pk PRIMARY KEY (username, name);
-- jiveGroupUser: Adds new column "username". Changes primary key
ALTER TABLE jiveGroupUser ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveGroupUser,jiveUser SET jiveGroupUser.username = jiveUser.username where jiveGroupUser.userID = jiveUser.userID;
ALTER TABLE jiveGroupUser DROP PRIMARY KEY;
ALTER TABLE jiveGroupUser ADD CONSTRAINT jiveGrpUser PRIMARY KEY (groupID, username, administrator);
-- jivePrivate: Adds new column "username". Changes primary key
ALTER TABLE jivePrivate ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jivePrivate,jiveUser SET jivePrivate.username = jiveUser.username where jivePrivate.userID = jiveUser.userID;
ALTER TABLE jivePrivate DROP PRIMARY KEY;
ALTER TABLE jivePrivate ADD CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace);
-- jiveOffline: Adds new column "username". Changes primary key
ALTER TABLE jiveOffline ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveOffline ,jiveUser SET jiveOffline.username = jiveUser.username where jiveOffline.userID = jiveUser.userID;
ALTER TABLE jiveOffline DROP PRIMARY KEY;
ALTER TABLE jiveOffline ADD CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID);
-- jiveRoster: Adds new column "username". Replaces old index with new one
ALTER TABLE jiveRoster ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveRoster,jiveUser SET jiveRoster.username = jiveUser.username where jiveRoster.userID = jiveUser.userID;
DROP INDEX jiveR_userid_idx;
CREATE INDEX jiveR_usrnme_idx ON jiveRoster (username ASC);
-- jiveVCard: Adds new column "username". Changes primary key
ALTER TABLE jiveVCard ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveVCard ,jiveUser SET jiveVCard.username = jiveUser.username where jiveVCard.userID = jiveUser.userID;
ALTER TABLE jiveVCard DROP PRIMARY KEY;
ALTER TABLE jiveVCard ADD CONSTRAINT jiveVCard_pk PRIMARY KEY (username, name);
-- Drops no longer needed tables
DROP TABLE jiveUserID;
DROP TABLE jiveChatbot;
DROP TABLE jiveDomain;
DROP TABLE jiveUserPerm;
-- Deletes no longer needed entries
DELETE FROM jiveID where idType = 0;
DELETE FROM jiveID where idType = 1;
DELETE FROM jiveID where idType = 2;
DELETE FROM jiveID where idType = 13;
DELETE FROM jiveID where idType = 14;
-- Finally remove "userID" column
ALTER TABLE jiveUserProp DROP COLUMN userID;
ALTER TABLE jiveUser DROP COLUMN userID;
ALTER TABLE jiveGroupUser DROP COLUMN userID;
ALTER TABLE jivePrivate DROP COLUMN userID;
ALTER TABLE jiveOffline DROP COLUMN userID;
ALTER TABLE jiveRoster DROP COLUMN userID;
ALTER TABLE jiveVCard DROP COLUMN userID;
-- Create new tables
CREATE TABLE jiveProperty (
name VARCHAR(100) NOT NULL,
propValue VARCHAR(3000) NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
-- MUC tables
CREATE TABLE mucRoom (
roomID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR(50) NOT NULL,
naturalName VARCHAR(255) NOT NULL,
description VARCHAR(255),
canChangeSubject INTEGER NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom INTEGER NOT NULL,
moderated INTEGER NOT NULL,
invitationRequired INTEGER NOT NULL,
canInvite INTEGER NOT NULL,
password VARCHAR(50) NULL,
canDiscoverJID INTEGER NOT NULL,
logEnabled INTEGER NOT NULL,
subject VARCHAR(100) NULL,
rolesToBroadcast INTEGER NOT NULL,
lastActiveDate CHAR(15) NULL,
inMemory INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomid_idx ON mucRoom (roomID);
CREATE TABLE mucAffiliation (
roomID INTEGER NOT NULL,
jid VARCHAR(2000) NOT NULL,
affiliation INTEGER NOT NULL,
CONSTRAINT mucAffiliation_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucMember (
roomID INTEGER NOT NULL,
jid VARCHAR(2000) NOT NULL,
nickname VARCHAR(255) NULL,
CONSTRAINT mucMember_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucConversationLog (
roomID INTEGER NOT NULL,
sender VARCHAR(2000) NOT NULL,
nickname VARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR(255) NULL,
body LONG VARCHAR NULL
);
-- Unique ID entry for mucRoom
insert INTO jiveID (idType, id) VALUES (23, 1);
\ No newline at end of file
// $RCSfile$
// $Revision$
// $Date$
// upgrades from Messenger 1.1.x to 2.0.x
// jiveUser: Adds new column "username". Removes "nameVisible" & "emailVisible". Changes primary key
ALTER TABLE jiveUser ADD COLUMN username VARCHAR(32) NOT NULL;
ALTER TABLE jiveUser DROP COLUMN nameVisible;
ALTER TABLE jiveUser DROP COLUMN emailVisible;
UPDATE jiveUser,jiveUserID SET jiveUser.username = jiveUserID.username where jiveUserID.objectID = jiveUser.userID;
ALTER TABLE jiveUser DROP PRIMARY KEY;
ALTER TABLE jiveUser ADD CONSTRAINT jiveUser_pk PRIMARY KEY (username);
// jiveUserProp: Adds new column "username". Changes primary key
ALTER TABLE jiveUserProp ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveUserProp,jiveUser SET jiveUserProp.username = jiveUser.username where jiveUserProp.userID = jiveUser.userID;
ALTER TABLE jiveUserProp DROP PRIMARY KEY;
ALTER TABLE jiveUserProp ADD CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name);
// jiveGroupUser: Adds new column "username". Changes primary key
ALTER TABLE jiveGroupUser ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveGroupUser,jiveUser SET jiveGroupUser.username = jiveUser.username where jiveGroupUser.userID = jiveUser.userID;
ALTER TABLE jiveGroupUser DROP PRIMARY KEY;
ALTER TABLE jiveGroupUser ADD CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupID, username, administrator);
// jivePrivate: Adds new column "username". Changes primary key
ALTER TABLE jivePrivate ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jivePrivate,jiveUser SET jivePrivate.username = jiveUser.username where jivePrivate.userID = jiveUser.userID;
ALTER TABLE jivePrivate DROP PRIMARY KEY;
ALTER TABLE jivePrivate ADD CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace);
// jiveOffline: Adds new column "username". Changes primary key
ALTER TABLE jiveOffline ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveOffline ,jiveUser SET jiveOffline.username = jiveUser.username where jiveOffline.userID = jiveUser.userID;
ALTER TABLE jiveOffline DROP PRIMARY KEY;
ALTER TABLE jiveOffline ADD CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID);
// jiveRoster: Adds new column "username". Replaces old index with new one
ALTER TABLE jiveRoster ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveRoster,jiveUser SET jiveRoster.username = jiveUser.username where jiveRoster.userID = jiveUser.userID;
DROP INDEX jiveRoster_userid_idx;
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username);
// jiveVCard: Adds new column "username". Changes primary key
ALTER TABLE jiveVCard ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveVCard ,jiveUser SET jiveVCard.username = jiveUser.username where jiveVCard.userID = jiveUser.userID;
ALTER TABLE jiveVCard DROP PRIMARY KEY;
ALTER TABLE jiveVCard ADD CONSTRAINT jiveVCard_pk PRIMARY KEY (username, name);
// Drops no longer needed tables
DROP TABLE jiveUserID;
DROP TABLE jiveChatbot;
DROP TABLE jiveDomain;
DROP TABLE jiveUserPerm;
// Deletes no longer needed entries
DELETE FROM jiveID where idType = 0;
DELETE FROM jiveID where idType = 1;
DELETE FROM jiveID where idType = 2;
DELETE FROM jiveID where idType = 13;
DELETE FROM jiveID where idType = 14;
// Finally remove "userID" column
ALTER TABLE jiveUserProp DROP COLUMN userID;
ALTER TABLE jiveUser DROP COLUMN userID;
ALTER TABLE jiveGroupUser DROP COLUMN userID;
ALTER TABLE jivePrivate DROP COLUMN userID;
ALTER TABLE jiveOffline DROP COLUMN userID;
ALTER TABLE jiveRoster DROP COLUMN userID;
ALTER TABLE jiveVCard DROP COLUMN userID;
// Create new tables
CREATE TABLE jiveProperty (
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
// MUC Tables
CREATE TABLE mucRoom (
roomID BIGINT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR(50) NOT NULL,
naturalName VARCHAR(255) NOT NULL,
description VARCHAR(255),
canChangeSubject INTEGER NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom INTEGER NOT NULL,
moderated INTEGER NOT NULL,
invitationRequired INTEGER NOT NULL,
canInvite INTEGER NOT NULL,
password VARCHAR(50) NULL,
canDiscoverJID INTEGER NOT NULL,
logEnabled INTEGER NOT NULL,
subject VARCHAR(100) NULL,
rolesToBroadcast INTEGER NOT NULL,
lastActiveDate CHAR(15) NULL,
inMemory INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomid_idx ON mucRoom(roomID);
CREATE TABLE mucAffiliation (
roomID BIGINT NOT NULL,
jid VARCHAR(3071) NOT NULL,
affiliation INTEGER NOT NULL,
CONSTRAINT mucAffiliation_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucMember (
roomID BIGINT NOT NULL,
jid VARCHAR(3071) NOT NULL,
nickname VARCHAR(255) NULL,
CONSTRAINT mucMember_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucConversationLog (
roomID BIGINT NOT NULL,
sender VARCHAR(3071) NOT NULL,
nickname VARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR(255) NULL,
body LONGVARCHAR NULL
);
// Unique ID entry for mucRoom
INSERT INTO jiveID (idType, id) VALUES (23, 1);
\ No newline at end of file
# $RCSfile$
# $Revision$
# $Date$
# upgrades from Messenger 1.1.x to 2.0.x
# jiveUser: Adds new column "username". Removes "nameVisible" & "emailVisible". Changes primary key
ALTER TABLE jiveUser ADD COLUMN username VARCHAR(32) NOT NULL;
ALTER TABLE jiveUser DROP COLUMN nameVisible;
ALTER TABLE jiveUser DROP COLUMN emailVisible;
UPDATE jiveUser,jiveUserID SET jiveUser.username = jiveUserID.username where jiveUserID.objectID = jiveUser.userID;
ALTER TABLE jiveUser DROP PRIMARY KEY;
ALTER TABLE jiveUser ADD PRIMARY KEY (username);
# jiveUserProp: Adds new column "username". Changes primary key
ALTER TABLE jiveUserProp ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveUserProp,jiveUser SET jiveUserProp.username = jiveUser.username where jiveUserProp.userID = jiveUser.userID;
ALTER TABLE jiveUserProp DROP PRIMARY KEY;
ALTER TABLE jiveUserProp ADD PRIMARY KEY (username, name);
# jiveGroupUser: Adds new column "username". Changes primary key
ALTER TABLE jiveGroupUser ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveGroupUser,jiveUser SET jiveGroupUser.username = jiveUser.username where jiveGroupUser.userID = jiveUser.userID;
ALTER TABLE jiveGroupUser DROP PRIMARY KEY;
ALTER TABLE jiveGroupUser ADD PRIMARY KEY (groupID, username, administrator);
# jivePrivate: Adds new column "username". Changes primary key
ALTER TABLE jivePrivate ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jivePrivate,jiveUser SET jivePrivate.username = jiveUser.username where jivePrivate.userID = jiveUser.userID;
ALTER TABLE jivePrivate DROP PRIMARY KEY;
ALTER TABLE jivePrivate ADD PRIMARY KEY (username, name, namespace);
# jiveOffline: Adds new column "username". Changes primary key
ALTER TABLE jiveOffline ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveOffline ,jiveUser SET jiveOffline.username = jiveUser.username where jiveOffline.userID = jiveUser.userID;
ALTER TABLE jiveOffline DROP PRIMARY KEY;
ALTER TABLE jiveOffline ADD PRIMARY KEY (username, messageID);
# jiveRoster: Adds new column "username". Replaces old index with new one
ALTER TABLE jiveRoster ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveRoster,jiveUser SET jiveRoster.username = jiveUser.username where jiveRoster.userID = jiveUser.userID;
ALTER TABLE jiveRoster DROP INDEX jiveRoster_userid_idx;
ALTER TABLE jiveRoster ADD INDEX jiveRoster_unameid_idx (username);
# jiveVCard: Adds new column "username". Changes primary key
ALTER TABLE jiveVCard ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveVCard ,jiveUser SET jiveVCard.username = jiveUser.username where jiveVCard.userID = jiveUser.userID;
ALTER TABLE jiveVCard DROP PRIMARY KEY;
ALTER TABLE jiveVCard ADD PRIMARY KEY (username, name);
# Drops no longer needed tables
DROP TABLE jiveUserID;
DROP TABLE jiveChatbot;
DROP TABLE jiveDomain;
DROP TABLE jiveUserPerm;
# Deletes no longer needed entries
DELETE FROM jiveID where idType = 0;
DELETE FROM jiveID where idType = 1;
DELETE FROM jiveID where idType = 2;
DELETE FROM jiveID where idType = 13;
DELETE FROM jiveID where idType = 14;
# Finally remove "userID" column
ALTER TABLE jiveUserProp DROP COLUMN userID;
ALTER TABLE jiveUser DROP COLUMN userID;
ALTER TABLE jiveGroupUser DROP COLUMN userID;
ALTER TABLE jivePrivate DROP COLUMN userID;
ALTER TABLE jiveOffline DROP COLUMN userID;
ALTER TABLE jiveRoster DROP COLUMN userID;
ALTER TABLE jiveVCard DROP COLUMN userID;
# Create new tables
CREATE TABLE jiveProperty (
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (name)
);
# MUC Tables
CREATE TABLE mucRoom (
roomID BIGINT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR(50) NOT NULL,
naturalName VARCHAR(255) NOT NULL,
description VARCHAR(255),
canChangeSubject TINYINT NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom TINYINT NOT NULL,
moderated TINYINT NOT NULL,
invitationRequired TINYINT NOT NULL,
canInvite TINYINT NOT NULL,
password VARCHAR(50) NULL,
canDiscoverJID TINYINT NOT NULL,
logEnabled TINYINT NOT NULL,
subject VARCHAR(100) NULL,
rolesToBroadcast TINYINT NOT NULL,
lastActiveDate CHAR(15) NULL,
inMemory TINYINT NOT NULL,
PRIMARY KEY (name),
INDEX mucRoom_roomid_idx (roomID)
);
CREATE TABLE mucAffiliation (
roomID BIGINT NOT NULL,
jid TEXT NOT NULL,
affiliation TINYINT NOT NULL,
PRIMARY KEY (roomID,jid(70))
);
CREATE TABLE mucMember (
roomID BIGINT NOT NULL,
jid TEXT NOT NULL,
nickname VARCHAR(255) NULL,
PRIMARY KEY (roomID,jid(70))
);
CREATE TABLE mucConversationLog (
roomID BIGINT NOT NULL,
sender TEXT NOT NULL,
nickname VARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR(255) NULL,
body TEXT NULL
);
# Unique ID entry for mucRoom
INSERT INTO jiveID (idType, id) VALUES (23, 1);
\ No newline at end of file
REM // $RCSfile$
REM // $Revision$
REM // $Date$
REM // upgrades from Messenger 1.1.x to 2.0.x
REM // jiveUser: Adds new column "username". Removes "nameVisible" & "emailVisible". Changes primary key
ALTER TABLE jiveUser ADD username VARCHAR2(32) NOT NULL;
ALTER TABLE jiveUser DROP COLUMN nameVisible;
ALTER TABLE jiveUser DROP COLUMN emailVisible;
UPDATE jiveUser,jiveUserID SET jiveUser.username = jiveUserID.username where jiveUserID.objectID = jiveUser.userID;
ALTER TABLE jiveUser DROP PRIMARY KEY;
ALTER TABLE jiveUser ADD CONSTRAINT jiveUser_pk PRIMARY KEY (username);
REM // jiveUserProp: Adds new column "username". Changes primary key
ALTER TABLE jiveUserProp ADD username VARCHAR2(32) NOT NULL;
UPDATE jiveUserProp,jiveUser SET jiveUserProp.username = jiveUser.username where jiveUserProp.userID = jiveUser.userID;
ALTER TABLE jiveUserProp DROP PRIMARY KEY;
ALTER TABLE jiveUserProp ADD CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name);
REM // jiveGroupUser: Adds new column "username". Changes primary key
ALTER TABLE jiveGroupUser ADD username VARCHAR2(32) NOT NULL;
UPDATE jiveGroupUser,jiveUser SET jiveGroupUser.username = jiveUser.username where jiveGroupUser.userID = jiveUser.userID;
ALTER TABLE jiveGroupUser DROP PRIMARY KEY;
ALTER TABLE jiveGroupUser ADD CONSTRAINT jiveGroupUser PRIMARY KEY (groupID, username, administrator);
REM // jivePrivate: Adds new column "username". Changes primary key
ALTER TABLE jivePrivate ADD username VARCHAR2(32) NOT NULL;
UPDATE jivePrivate,jiveUser SET jivePrivate.username = jiveUser.username where jivePrivate.userID = jiveUser.userID;
ALTER TABLE jivePrivate DROP PRIMARY KEY;
ALTER TABLE jivePrivate ADD CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace);
REM // jiveOffline: Adds new column "username". Changes primary key
ALTER TABLE jiveOffline ADD username VARCHAR2(32) NOT NULL;
UPDATE jiveOffline ,jiveUser SET jiveOffline.username = jiveUser.username where jiveOffline.userID = jiveUser.userID;
ALTER TABLE jiveOffline DROP PRIMARY KEY;
ALTER TABLE jiveOffline ADD CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID);
REM // jiveRoster: Adds new column "username". Replaces old index with new one
ALTER TABLE jiveRoster ADD username VARCHAR2(32) NOT NULL;
UPDATE jiveRoster,jiveUser SET jiveRoster.username = jiveUser.username where jiveRoster.userID = jiveUser.userID;
DROP INDEX jiveRoster_userid_idx;
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC);
REM // jiveVCard: Adds new column "username". Changes primary key
ALTER TABLE jiveVCard ADD username VARCHAR2(32) NOT NULL;
UPDATE jiveVCard ,jiveUser SET jiveVCard.username = jiveUser.username where jiveVCard.userID = jiveUser.userID;
ALTER TABLE jiveVCard DROP PRIMARY KEY;
ALTER TABLE jiveVCard ADD CONSTRAINT jiveVCard_pk PRIMARY KEY (username, name);
REM // Drops no longer needed tables
DROP TABLE jiveUserID;
DROP TABLE jiveChatbot;
DROP TABLE jiveDomain;
DROP TABLE jiveUserPerm;
REM // Deletes no longer needed entries
DELETE FROM jiveID where idType = 0;
DELETE FROM jiveID where idType = 1;
DELETE FROM jiveID where idType = 2;
DELETE FROM jiveID where idType = 13;
DELETE FROM jiveID where idType = 14;
REM // Finally remove "userID" column
ALTER TABLE jiveUserProp DROP COLUMN userID;
ALTER TABLE jiveUser DROP COLUMN userID;
ALTER TABLE jiveGroupUser DROP COLUMN userID;
ALTER TABLE jivePrivate DROP COLUMN userID;
ALTER TABLE jiveOffline DROP COLUMN userID;
ALTER TABLE jiveRoster DROP COLUMN userID;
ALTER TABLE jiveVCard DROP COLUMN userID;
REM // Create new tables
CREATE TABLE jiveProperty (
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(4000) NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
REM // MUC Tables
CREATE TABLE mucRoom(
roomID INT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR2(50) NOT NULL,
naturalName VARCHAR2(255) NOT NULL,
description VARCHAR2(255),
canChangeSubject INTEGER NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom INTEGER NOT NULL,
moderated INTEGER NOT NULL,
invitationRequired INTEGER NOT NULL,
canInvite INTEGER NOT NULL,
password VARCHAR2(50) NULL,
canDiscoverJID INTEGER NOT NULL,
logEnabled INTEGER NOT NULL,
subject VARCHAR2(100) NULL,
rolesToBroadcast INTEGER NOT NULL,
lastActiveDate CHAR(15) NULL,
inMemory INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomid_idx ON mucRoom (roomID);
CREATE TABLE mucAffiliation (
roomID INT NOT NULL,
jid VARCHAR2(4000) NOT NULL,
affiliation INTEGER NOT NULL,
CONSTRAINT mucAffiliation_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucMember (
roomID INT NOT NULL,
jid VARCHAR2(4000) NOT NULL,
nickname VARCHAR2(255) NULL,
CONSTRAINT mucMember_pk PRIMARY KEY (roomID, jid)
);
CREATE TABLE mucConversationLog (
roomID INT NOT NULL,
sender VARCHAR2(4000) NOT NULL,
nickname VARCHAR2(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR2(255) NULL,
body VARCHAR2(4000) NULL
);
REM // Unique ID entry for mucRoom
INSERT INTO jiveID (idType, id) VALUES (23, 1);
\ No newline at end of file
-- $RCSfile$
-- $Revision$
-- $Date$
-- upgrades from Messenger 1.1.x to 2.0.x
-- jiveUser: Adds new column "username". Removes "nameVisible" & "emailVisible". Changes primary key
ALTER TABLE jiveUser ADD COLUMN username VARCHAR(32) NOT NULL;
ALTER TABLE jiveUser DROP COLUMN nameVisible;
ALTER TABLE jiveUser DROP COLUMN emailVisible;
UPDATE jiveUser,jiveUserID SET jiveUser.username = jiveUserID.username where jiveUserID.objectID = jiveUser.userID;
ALTER TABLE jiveUser DROP PRIMARY KEY;
ALTER TABLE jiveUser ADD CONSTRAINT jiveUser_pk PRIMARY KEY (username);
-- jiveUserProp: Adds new column "username". Changes primary key
ALTER TABLE jiveUserProp ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveUserProp,jiveUser SET jiveUserProp.username = jiveUser.username where jiveUserProp.userID = jiveUser.userID;
ALTER TABLE jiveUserProp DROP PRIMARY KEY;
ALTER TABLE jiveUserProp ADD CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name);
-- jiveGroupUser: Adds new column "username". Changes primary key
ALTER TABLE jiveGroupUser ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveGroupUser,jiveUser SET jiveGroupUser.username = jiveUser.username where jiveGroupUser.userID = jiveUser.userID;
ALTER TABLE jiveGroupUser DROP PRIMARY KEY;
ALTER TABLE jiveGroupUser ADD CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupID, username, administrator);
-- jivePrivate: Adds new column "username". Changes primary key
ALTER TABLE jivePrivate ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jivePrivate,jiveUser SET jivePrivate.username = jiveUser.username where jivePrivate.userID = jiveUser.userID;
ALTER TABLE jivePrivate DROP PRIMARY KEY;
ALTER TABLE jivePrivate ADD CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace);
-- jiveOffline: Adds new column "username". Changes primary key
ALTER TABLE jiveOffline ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveOffline ,jiveUser SET jiveOffline.username = jiveUser.username where jiveOffline.userID = jiveUser.userID;
ALTER TABLE jiveOffline DROP PRIMARY KEY;
ALTER TABLE jiveOffline ADD CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID);
-- jiveRoster: Adds new column "username". Replaces old index with new one
ALTER TABLE jiveRoster ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveRoster,jiveUser SET jiveRoster.username = jiveUser.username where jiveRoster.userID = jiveUser.userID;
DROP INDEX jiveRoster_userID_idx;
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username);
-- jiveVCard: Adds new column "username". Changes primary key
ALTER TABLE jiveVCard ADD COLUMN username VARCHAR(32) NOT NULL;
UPDATE jiveVCard ,jiveUser SET jiveVCard.username = jiveUser.username where jiveVCard.userID = jiveUser.userID;
ALTER TABLE jiveVCard DROP PRIMARY KEY;
ALTER TABLE jiveVCard ADD CONSTRAINT jiveVCard_pk PRIMARY KEY (username, name);
-- Drops no longer needed tables
DROP TABLE jiveUserID;
DROP TABLE jiveChatbot;
DROP TABLE jiveDomain;
DROP TABLE jiveUserPerm;
-- Deletes no longer needed entries
DELETE FROM jiveID where idType = 0;
DELETE FROM jiveID where idType = 1;
DELETE FROM jiveID where idType = 2;
DELETE FROM jiveID where idType = 13;
DELETE FROM jiveID where idType = 14;
-- Finally remove "userID" column
ALTER TABLE jiveUserProp DROP COLUMN userID;
ALTER TABLE jiveUser DROP COLUMN userID;
ALTER TABLE jiveGroupUser DROP COLUMN userID;
ALTER TABLE jivePrivate DROP COLUMN userID;
ALTER TABLE jiveOffline DROP COLUMN userID;
ALTER TABLE jiveRoster DROP COLUMN userID;
ALTER TABLE jiveVCard DROP COLUMN userID;
-- Create new tables
CREATE TABLE jiveProperty (
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
-- MUC Tables
CREATE TABLE mucRoom (
roomID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name VARCHAR(50) NOT NULL,
naturalName VARCHAR(255) NOT NULL,
description VARCHAR(255),
canChangeSubject INTEGER NOT NULL,
maxUsers INTEGER NOT NULL,
publicRoom INTEGER NOT NULL,
moderated INTEGER NOT NULL,
invitationRequired INTEGER NOT NULL,
canInvite INTEGER NOT NULL,
password VARCHAR(50) NULL,
canDiscoverJID INTEGER NOT NULL,
logEnabled INTEGER NOT NULL,
subject VARCHAR(100) NULL,
rolesToBroadcast INTEGER NOT NULL,
lastActiveDate CHAR(15) NULL,
inMemory INTEGER NOT NULL,
CONSTRAINT mucRoom__pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomID_idx ON mucRoom(roomID);
CREATE TABLE mucAffiliation (
roomID INTEGER NOT NULL,
jid VARCHAR(3000) NOT NULL,
affiliation INTEGER NOT NULL,
CONSTRAINT mucAffiliation__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucMember (
roomID INTEGER NOT NULL,
jid TEXT NOT NULL,
nickname VARCHAR(255) NULL,
CONSTRAINT mucMember__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucConversationLog (
roomID INTEGER NOT NULL,
sender TEXT NOT NULL,
nickname VARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject VARCHAR(255) NULL,
body TEXT NULL
);
-- Unique ID entry for mucRoom
INSERT INTO jiveID (idType, id) VALUES (23, 1);
\ No newline at end of file
/* $RCSfile$ */
/* $Revision$ */
/* $Date$ */
/* upgrades from Messenger 1.1.x to 2.0.x */
/* jiveUser: Adds new column "username". Removes "nameVisible" & "emailVisible". Changes primary key */
ALTER TABLE jiveUser ADD COLUMN username NVARCHAR(32) NOT NULL;
ALTER TABLE jiveUser DROP COLUMN nameVisible;
ALTER TABLE jiveUser DROP COLUMN emailVisible;
UPDATE jiveUser,jiveUserID SET jiveUser.username = jiveUserID.username where jiveUserID.objectID = jiveUser.userID;
ALTER TABLE jiveUser DROP PRIMARY KEY;
ALTER TABLE jiveUser ADD CONSTRAINT jiveUser_pk PRIMARY KEY (username);
/* jiveUserProp: Adds new column "username". Changes primary key */
ALTER TABLE jiveUserProp ADD COLUMN username NVARCHAR(32) NOT NULL;
UPDATE jiveUserProp,jiveUser SET jiveUserProp.username = jiveUser.username where jiveUserProp.userID = jiveUser.userID;
ALTER TABLE jiveUserProp DROP PRIMARY KEY;
ALTER TABLE jiveUserProp ADD CONSTRAINT jiveUserProp_pk PRIMARY KEY (username, name);
/* jiveGroupUser: Adds new column "username". Changes primary key */
ALTER TABLE jiveGroupUser ADD COLUMN username NVARCHAR(32) NOT NULL;
UPDATE jiveGroupUser,jiveUser SET jiveGroupUser.username = jiveUser.username where jiveGroupUser.userID = jiveUser.userID;
ALTER TABLE jiveGroupUser DROP PRIMARY KEY;
ALTER TABLE jiveGroupUser ADD CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupID, username, administrator);
/* jivePrivate: Adds new column "username". Changes primary key */
ALTER TABLE jivePrivate ADD COLUMN username NVARCHAR(32) NOT NULL;
UPDATE jivePrivate,jiveUser SET jivePrivate.username = jiveUser.username where jivePrivate.userID = jiveUser.userID;
ALTER TABLE jivePrivate DROP PRIMARY KEY;
ALTER TABLE jivePrivate ADD CONSTRAINT jivePrivate_pk PRIMARY KEY (username, name, namespace);
/* jiveOffline: Adds new column "username". Changes primary key */
ALTER TABLE jiveOffline ADD COLUMN username NVARCHAR(32) NOT NULL;
UPDATE jiveOffline ,jiveUser SET jiveOffline.username = jiveUser.username where jiveOffline.userID = jiveUser.userID;
ALTER TABLE jiveOffline DROP PRIMARY KEY;
ALTER TABLE jiveOffline ADD CONSTRAINT jiveOffline_pk PRIMARY KEY (username, messageID);
/* jiveRoster: Adds new column "username". Replaces old index with new one */
ALTER TABLE jiveRoster ADD COLUMN username NVARCHAR(32) NOT NULL;
UPDATE jiveRoster,jiveUser SET jiveRoster.username = jiveUser.username where jiveRoster.userID = jiveUser.userID;
DROP INDEX jiveRoster_userID_idx;
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC);
/* jiveVCard: Adds new column "username". Changes primary key */
ALTER TABLE jiveVCard ADD COLUMN username NVARCHAR(32) NOT NULL;
UPDATE jiveVCard ,jiveUser SET jiveVCard.username = jiveUser.username where jiveVCard.userID = jiveUser.userID;
ALTER TABLE jiveVCard DROP PRIMARY KEY;
ALTER TABLE jiveVCard ADD CONSTRAINT jiveVCard_pk PRIMARY KEY (username, name);
/* Drops no longer needed tables */
DROP TABLE jiveUserID;
DROP TABLE jiveChatbot;
DROP TABLE jiveDomain;
DROP TABLE jiveUserPerm;
/* Deletes no longer needed entries */
DELETE FROM jiveID where idType = 0;
DELETE FROM jiveID where idType = 1;
DELETE FROM jiveID where idType = 2;
DELETE FROM jiveID where idType = 13;
DELETE FROM jiveID where idType = 14;
/* Finally remove "userID" column */
ALTER TABLE jiveUserProp DROP COLUMN userID;
ALTER TABLE jiveUser DROP COLUMN userID;
ALTER TABLE jiveGroupUser DROP COLUMN userID;
ALTER TABLE jivePrivate DROP COLUMN userID;
ALTER TABLE jiveOffline DROP COLUMN userID;
ALTER TABLE jiveRoster DROP COLUMN userID;
ALTER TABLE jiveVCard DROP COLUMN userID;
/* Create new tables */
CREATE TABLE jiveProperty (
name NVARCHAR(100) NOT NULL,
propValue NTEXT NOT NULL,
CONSTRAINT jiveProperty_pk PRIMARY KEY (name)
);
/* MUC Tables */
CREATE TABLE mucRoom (
roomID INT NOT NULL,
creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL,
name NVARCHAR(50) NOT NULL,
naturalName NVARCHAR(255) NOT NULL,
description NVARCHAR(255),
canChangeSubject INT NOT NULL,
maxUsers INT NOT NULL,
publicRoom INT NOT NULL,
moderated INT NOT NULL,
invitationRequired INT NOT NULL,
canInvite INT NOT NULL,
password NVARCHAR(50) NULL,
canDiscoverJID INT NOT NULL,
logEnabled INT NOT NULL,
subject NVARCHAR(100) NULL,
rolesToBroadcast INT NOT NULL,
lastActiveDate CHAR(15) NULL,
inMemory INT NOT NULL,
CONSTRAINT mucRoom__pk PRIMARY KEY (name)
);
CREATE INDEX mucRoom_roomID_idx on mucRoom(roomID);
CREATE TABLE mucAffiliation (
roomID INT NOT NULL,
jid NVARCHAR(3000) NOT NULL,
affiliation INT NOT NULL,
CONSTRAINT mucAffiliation__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucMember (
roomID INT NOT NULL,
jid NVARCHAR(3000) NOT NULL,
nickname NVARCHAR(255) NULL,
CONSTRAINT mucMember__pk PRIMARY KEY (roomID,jid)
);
CREATE TABLE mucConversationLog (
roomID INT NOT NULL,
sender NVARCHAR(3000) NOT NULL,
nickname NVARCHAR(255) NULL,
time CHAR(15) NOT NULL,
subject NVARCHAR(255) NULL,
body NVARCHAR(3700) NULL
);
/* Unique ID entry for mucRoom */
INSERT INTO jiveID (idType, id) VALUES (23, 1);
\ No newline at end of file
-- $RCSfile$
-- $Revision$
-- $Date$
-- upgrades from Messenger 2.0.x to 2.1.0
-- jiveGroup: Recreate table from scratch
DROP TABLE jiveGroup;
CREATE TABLE jiveGroup (
groupName VARCHAR(50) NOT NULL,
description VARCHAR(255),
CONSTRAINT jiveGroup_pk PRIMARY KEY (groupName)
);
-- jiveGroupProp: Recreate table from scratch
DROP TABLE jiveGroupProp;
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(2000) NOT NULL,
CONSTRAINT jiveGrpProp_pk PRIMARY KEY (groupName, name)
);
-- jiveGroupUser: Recreate table from scratch
DROP TABLE jiveGroupUser;
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGrpUser PRIMARY KEY (groupName, username, administrator)
);
-- mucRoom: Add new columns: "lockedDate" and "emptyDate". Rename column "invitationRequired" to "membersOnly". Delete columns: "lastActiveDate" and "inMemory".
ALTER TABLE mucRoom ADD COLUMN lockedDate CHAR(15) NOT NULL;
ALTER TABLE mucRoom ADD COLUMN emptyDate CHAR(15) NULL;
ALTER TABLE mucRoom RENAME COLUMN invitationRequired TO membersOnly;
ALTER TABLE mucRoom DROP COLUMN lastActiveDate;
ALTER TABLE mucRoom DROP COLUMN inMemory;
-- mucMember: Add new columns
ALTER TABLE mucMember ADD COLUMN firstName VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN lastName VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN url VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN email VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN faqentry VARCHAR(100) NULL;
-- mucConversationLog: Add new index
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
-- Deletes no longer needed entries
DELETE FROM jiveID where idType = 3;
DELETE FROM jiveID where idType = 4;
-- Add jiveVersion
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 1);
\ No newline at end of file
// $RCSfile$
// $Revision$
// $Date$
// upgrades from Messenger 2.0.x to 2.1.0
// jiveGroup: Recreate table from scratch
DROP TABLE jiveGroup;
CREATE TABLE jiveGroup (
groupName VARCHAR(50) NOT NULL,
description VARCHAR(255),
CONSTRAINT jiveGroup_pk PRIMARY KEY (groupName)
);
// jiveGroupProp: Recreate table from scratch
DROP TABLE jiveGroupProp;
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
// jiveGroupUser: Recreate table from scratch
DROP TABLE jiveGroupUser;
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupName, username, administrator)
);
// mucRoom: Add new columns: "lockedDate" and "emptyDate". Rename column "invitationRequired" to "membersOnly". Delete columns: "lastActiveDate" and "inMemory".
ALTER TABLE mucRoom ADD COLUMN lockedDate CHAR(15) NOT NULL BEFORE canChangeSubject;
ALTER TABLE mucRoom ADD COLUMN emptyDate CHAR(15) NULL BEFORE canChangeSubject;
// ALTER TABLE <tablename> ALTER COLUMN <columnname> {RENAME TO <newname> };
ALTER TABLE mucRoom ALTER COLUMN invitationRequired RENAME TO membersOnly;
ALTER TABLE mucRoom DROP COLUMN lastActiveDate;
ALTER TABLE mucRoom DROP COLUMN inMemory;
// mucMember: Add new columns
ALTER TABLE mucMember ADD COLUMN firstName VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN lastName VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN url VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN email VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN faqentry VARCHAR(100) NULL;
// mucConversationLog: Add new index
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
// Deletes no longer needed entries
DELETE FROM jiveID where idType = 3;
DELETE FROM jiveID where idType = 4;
// Add jiveVersion table
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 1);
\ No newline at end of file
# $RCSfile$
# $Revision$
# $Date$
# upgrades from Messenger 2.0.x to 2.1.0
# jiveGroup: Recreate table from scratch
DROP TABLE jiveGroup;
CREATE TABLE jiveGroup (
groupName VARCHAR(50) NOT NULL,
description VARCHAR(255),
PRIMARY KEY (groupName)
);
# jiveGroupProp: Recreate table from scratch
DROP TABLE jiveGroupProp;
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (groupName, name)
);
# jiveGroupUser: Recreate table from scratch
DROP TABLE jiveGroupUser;
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR(32) NOT NULL,
administrator TINYINT NOT NULL,
PRIMARY KEY (groupName, username, administrator)
);
# mucRoom: Add new columns: "lockedDate" and "emptyDate". Rename column "invitationRequired" to "membersOnly". Delete columns: "lastActiveDate" and "inMemory".
ALTER TABLE mucRoom ADD COLUMN lockedDate CHAR(15) NOT NULL AFTER description;
ALTER TABLE mucRoom ADD COLUMN emptyDate CHAR(15) NULL AFTER lockedDate;
ALTER TABLE mucRoom CHANGE invitationRequired membersOnly TINYINT NOT NULL;
ALTER TABLE mucRoom DROP COLUMN lastActiveDate;
ALTER TABLE mucRoom DROP COLUMN inMemory;
# mucMember: Add new columns
ALTER TABLE mucMember ADD COLUMN firstName VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN lastName VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN url VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN email VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN faqentry VARCHAR(100) NULL;
# mucConversationLog: Add new index
ALTER TABLE mucConversationLog ADD INDEX mucLog_time_idx (time);
# Deletes no longer needed entries
DELETE FROM jiveID where idType = 3;
DELETE FROM jiveID where idType = 4;
# Add jiveVersion table
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 1);
\ No newline at end of file
REM // $RCSfile$
REM // $Revision$
REM // $Date$
REM // upgrades from Messenger 2.0.x to 2.1.0
REM // jiveGroup: Recreate table from scratch
DROP TABLE jiveGroup;
CREATE TABLE jiveGroup (
groupName VARCHAR2(50) NOT NULL,
description VARCHAR2(255),
CONSTRAINT jiveGroup_pk PRIMARY KEY (groupName)
);
REM // jiveGroupProp: Recreate table from scratch
DROP TABLE jiveGroupProp;
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(4000) NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
REM // jiveGroupUser: Recreate table from scratch
DROP TABLE jiveGroupUser;
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR2(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser PRIMARY KEY (groupName, username, administrator)
);
REM // mucRoom: Add new columns: "lockedDate" and "emptyDate". Rename column "invitationRequired" to "membersOnly". Delete columns: "lastActiveDate" and "inMemory".
ALTER TABLE mucRoom ADD lockedDate CHAR(15) NOT NULL;
ALTER TABLE mucRoom ADD emptyDate CHAR(15) NULL;
ALTER TABLE mucRoom RENAME COLUMN invitationRequired TO membersOnly;
ALTER TABLE mucRoom DROP COLUMN lastActiveDate;
ALTER TABLE mucRoom DROP COLUMN inMemory;
REM // mucMember: Add new columns
ALTER TABLE mucMember ADD firstName VARCHAR2(100) NULL;
ALTER TABLE mucMember ADD lastName VARCHAR2(100) NULL;
ALTER TABLE mucMember ADD url VARCHAR2(100) NULL;
ALTER TABLE mucMember ADD email VARCHAR2(100) NULL;
ALTER TABLE mucMember ADD faqentry VARCHAR2(100) NULL;
REM // mucConversationLog: Add new index
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
REM // Deletes no longer needed entries
DELETE FROM jiveID where idType = 3;
DELETE FROM jiveID where idType = 4;
REM // Add jiveVersion table
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 1);
\ No newline at end of file
-- $RCSfile$
-- $Revision$
-- $Date$
-- upgrades from Messenger 2.0.x to 2.1.0
-- jiveGroup: Recreate table from scratch
DROP TABLE jiveGroup;
CREATE TABLE jiveGroup (
groupName VARCHAR(50) NOT NULL,
description VARCHAR(255),
CONSTRAINT jiveGroup_pk PRIMARY KEY (groupName)
);
-- jiveGroupProp: Recreate table from scratch
DROP TABLE jiveGroupProp;
CREATE TABLE jiveGroupProp (
groupName VARCHAR(50) NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
-- jiveGroupUser: Recreate table from scratch
DROP TABLE jiveGroupUser;
CREATE TABLE jiveGroupUser (
groupName VARCHAR(50) NOT NULL,
username VARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupName, username, administrator)
);
-- mucRoom: Add new columns: "lockedDate" and "emptyDate". Rename column "invitationRequired" to "membersOnly". Delete columns: "lastActiveDate" and "inMemory".
ALTER TABLE mucRoom ADD COLUMN lockedDate CHAR(15) NOT NULL;
ALTER TABLE mucRoom ADD COLUMN emptyDate CHAR(15) NULL;
ALTER TABLE mucRoom RENAME COLUMN invitationRequired TO membersOnly;
ALTER TABLE mucRoom DROP COLUMN lastActiveDate;
ALTER TABLE mucRoom DROP COLUMN inMemory;
-- mucMember: Add new columns
ALTER TABLE mucMember ADD COLUMN firstName VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN lastName VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN url VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN email VARCHAR(100) NULL;
ALTER TABLE mucMember ADD COLUMN faqentry VARCHAR(100) NULL;
-- mucConversationLog: Add new index
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
-- Deletes no longer needed entries
DELETE FROM jiveID where idType = 3;
DELETE FROM jiveID where idType = 4;
-- Add jiveVersion table
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 1);
\ No newline at end of file
/* $RCSfile$ */
/* $Revision$ */
/* $Date$ */
/* upgrades from Messenger 2.0.x to 2.1.0 */
/* jiveGroup: Recreate table from scratch */
DROP TABLE jiveGroup;
CREATE TABLE jiveGroup (
groupName NVARCHAR(50) NOT NULL,
description NVARCHAR(255),
CONSTRAINT group_pk PRIMARY KEY (groupName)
);
/* jiveGroupProp: Recreate table from scratch */
DROP TABLE jiveGroupProp;
CREATE TABLE jiveGroupProp (
groupName NVARCHAR(50) NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue NVARCHAR(2000) NOT NULL,
CONSTRAINT jiveGroupProp_pk PRIMARY KEY (groupName, name)
);
/* jiveGroupUser: Recreate table from scratch */
DROP TABLE jiveGroupUser;
CREATE TABLE jiveGroupUser (
groupName NVARCHAR(50) NOT NULL,
username NVARCHAR(32) NOT NULL,
administrator INTEGER NOT NULL,
CONSTRAINT jiveGroupUser_pk PRIMARY KEY (groupName, username, administrator)
);
/* mucRoom: Add new columns: "lockedDate" and "emptyDate". Rename column "invitationRequired" to "membersOnly". Delete columns: "lastActiveDate" and "inMemory". */
ALTER TABLE mucRoom ADD lockedDate CHAR(15) NOT NULL;
ALTER TABLE mucRoom ADD emptyDate CHAR(15) NULL;
ALTER TABLE mucRoom ADD membersOnly INT NOT NULL;
UPDATE mucRoom SET membersOnly = invitationRequired;
ALTER TABLE mucRoom DROP COLUMN invitationRequired;
ALTER TABLE mucRoom DROP COLUMN lastActiveDate;
ALTER TABLE mucRoom DROP COLUMN inMemory;
/* mucMember: Add new columns */
ALTER TABLE mucMember ADD firstName NVARCHAR(100) NULL;
ALTER TABLE mucMember ADD lastName NVARCHAR(100) NULL;
ALTER TABLE mucMember ADD url NVARCHAR(100) NULL;
ALTER TABLE mucMember ADD email NVARCHAR(100) NULL;
ALTER TABLE mucMember ADD faqentry NVARCHAR(100) NULL;
/* mucConversationLog: Add new index */
CREATE INDEX mucLog_time_idx ON mucConversationLog (time);
/* Deletes no longer needed entries */
DELETE FROM jiveID where idType = 3;
DELETE FROM jiveID where idType = 4;
/* Add jiveVersion table */
CREATE TABLE jiveVersion (
majorVersion INTEGER NOT NULL,
minorVersion INTEGER NOT NULL
);
INSERT INTO jiveVersion (majorVersion, minorVersion) VALUES (2, 1);
\ No newline at end of file
-- $RCSfile$
-- $Revision$
-- $Date$
-- upgrades from Messenger 2.1.x to 2.2.0
-- Update jiveVersion to JM 2.2
UPDATE jiveVersion SET majorVersion=2, minorVersion=2;
-- jiveExtComponentConf: Create new table
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR(255) NOT NULL,
secret VARCHAR(255),
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
-- jiveRemoteServerConf: Create new table
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
-- mucRoomProp: Create new table
CREATE TABLE mucRoomProp (
roomID INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(2000) NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
-- mucRoom: Add new columns: "useReservedNick", "canChangeNick" and "canRegister".
ALTER TABLE mucRoom ADD COLUMN useReservedNick INTEGER NOT NULL;
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)
);
// $RCSfile$
// $Revision$
// $Date$
// upgrades from Messenger 2.1.x to 2.2.0
// Update jiveVersion to JM 2.2
UPDATE jiveVersion SET majorVersion=2, minorVersion=2;
// jiveExtComponentConf: Create new table
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR(255) NOT NULL,
secret VARCHAR(255),
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
// jiveRemoteServerConf: Create new table
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
// mucRoomProp: Create new table
CREATE TABLE mucRoomProp (
roomID BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
// 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;
// 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)
);
# $RCSfile$
# $Revision$
# $Date$
# upgrades from Messenger 2.1.x to 2.2.0
# Update jiveVersion to JM 2.2
UPDATE jiveVersion SET majorVersion=2, minorVersion=2;
# jiveExtComponentConf: Create new table
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR(255) NOT NULL,
secret VARCHAR(255),
permission VARCHAR(10) NOT NULL,
PRIMARY KEY (subdomain)
);
# jiveRemoteServerConf: Create new table
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR(10) NOT NULL,
PRIMARY KEY (domain)
);
# mucRoomProp: Create new table
CREATE TABLE mucRoomProp (
roomID BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (roomID, name)
);
# mucRoom: Add new columns: "useReservedNick", "canChangeNick" and "canRegister".
ALTER TABLE mucRoom ADD COLUMN useReservedNick TINYINT NOT NULL;
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
REM // $RCSfile$
REM // $Revision$
REM // $Date$
REM // upgrades from Messenger 2.1.x to 2.2.0
REM // Update jiveVersion to JM 2.2
UPDATE jiveVersion SET majorVersion=2, minorVersion=2;
REM // jiveExtComponentConf: Create new table
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR2(255) NOT NULL,
secret VARCHAR2(255),
permission VARCHAR2(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
REM // jiveRemoteServerConf: Create new table
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR2(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR2(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
REM // mucRoomProp: Create new table
CREATE TABLE mucRoomProp (
roomID INT NOT NULL,
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(1024) NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
REM // mucRoom: Add new columns: "useReservedNick", "canChangeNick" and "canRegister".
ALTER TABLE mucRoom ADD useReservedNick INTEGER NOT NULL;
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)
);
-- $RCSfile$
-- $Revision$
-- $Date$
-- upgrades from Messenger 2.1.x to 2.2.0
-- Update jiveVersion to JM 2.2
UPDATE jiveVersion SET majorVersion=2, minorVersion=2;
-- jiveExtComponentConf: Create new table
CREATE TABLE jiveExtComponentConf (
subdomain VARCHAR(255) NOT NULL,
secret VARCHAR(255),
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
-- jiveRemoteServerConf: Create new table
CREATE TABLE jiveRemoteServerConf (
domain VARCHAR(255) NOT NULL,
remotePort INTEGER,
permission VARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
-- mucRoomProp: Create new table
CREATE TABLE mucRoomProp (
roomID INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
-- mucRoom: Add new columns: "useReservedNick", "canChangeNick" and "canRegister".
ALTER TABLE mucRoom ADD COLUMN useReservedNick INTEGER NOT NULL;
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)
);
/* $RCSfile$ */
/* $Revision$ */
/* $Date$ */
/* upgrades from Messenger 2.1.x to 2.2.0 */
/* Update jiveVersion to JM 2.2 */
UPDATE jiveVersion SET majorVersion=2, minorVersion=2;
/* jiveExtComponentConf: Create new table */
CREATE TABLE jiveExtComponentConf (
subdomain NVARCHAR(255) NOT NULL,
secret NVARCHAR(255),
permission NVARCHAR(10) NOT NULL,
CONSTRAINT jiveExtComponentConf_pk PRIMARY KEY (subdomain)
);
/* jiveRemoteServerConf: Create new table */
CREATE TABLE jiveRemoteServerConf (
domain NVARCHAR(255) NOT NULL,
remotePort INTEGER,
permission NVARCHAR(10) NOT NULL,
CONSTRAINT jiveRemoteServerConf_pk PRIMARY KEY (domain)
);
/* mucRoomProp: Create new table */
CREATE TABLE mucRoomProp (
roomID INT NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue NVARCHAR(2000) NOT NULL,
CONSTRAINT mucRoomProp_pk PRIMARY KEY (roomID, name)
);
/* mucRoom: Add new columns: "useReservedNick", "canChangeNick" and "canRegister". */
ALTER TABLE mucRoom ADD useReservedNick INT NOT NULL;
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)
);
-- $RCSfile$
-- $Revision: 795 $
-- $Date: 2005-01-06 07:44:42 -0300 (Thu, 06 Jan 2005) $
-- upgrades from Messenger 2.2.x to 2.4.0
-- Update jiveVersion to JM 2.4
UPDATE jiveVersion SET majorVersion=2, minorVersion=4;
-- jiveGroupUser: Alter length of username column
ALTER TABLE jiveGroupUser ALTER COLUMN username SET DATA TYPE VARCHAR(100);
\ No newline at end of file
// $RCSfile$
// $Revision: 795 $
// $Date: 2005-01-06 07:44:42 -0300 (Thu, 06 Jan 2005) $
// upgrades from Messenger 2.2.x to 2.4.0
// Update jiveVersion to JM 2.4
UPDATE jiveVersion SET majorVersion=2, minorVersion=4;
// jiveGroupUser: Alter length of username column
ALTER TABLE jiveGroupUser ALTER COLUMN username VARCHAR(100) NOT NULL;
# $RCSfile$
# $Revision: 1650 $
# $Date: 2005-07-20 00:18:17 -0300 (Wed, 20 Jul 2005) $
# upgrades from Messenger 2.2.x to 2.4.0
# Update jiveVersion to JM 2.4
UPDATE jiveVersion SET majorVersion=2, minorVersion=4;
# jiveGroupUser: Alter length of username column
ALTER TABLE jiveGroupUser CHANGE username username varchar(100) NOT NULL;
REM // $RCSfile$
REM // $Revision: 795 $
REM // $Date: 2005-01-06 07:44:42 -0300 (Thu, 06 Jan 2005) $
REM // upgrades from Messenger 2.2.x to 2.4.0
REM // Update jiveVersion to JM 2.4
UPDATE jiveVersion SET majorVersion=2, minorVersion=4;
REM // jiveGroupUser: Alter length of username column
ALTER TABLE jiveGroupUser MODIFY username VARCHAR2(100) NOT NULL;
-- $RCSfile$
-- $Revision: 795 $
-- $Date: 2005-01-06 07:44:42 -0300 (Thu, 06 Jan 2005) $
-- upgrades from Messenger 2.2.x to 2.4.0
-- Update jiveVersion to JM 2.4
UPDATE jiveVersion SET majorVersion=2, minorVersion=4;
-- jiveGroupUser: Alter length of username column
ALTER TABLE jiveGroupUser ALTER COLUMN username TYPE VARCHAR(100) NOT NULL;
\ No newline at end of file
/* $RCSfile$ */
/* $Revision: 840 $ */
/* $Date: 2005-01-10 01:30:06 -0300 (Mon, 10 Jan 2005) $ */
/* upgrades from Messenger 2.2.x to 2.4.0 */
/* Update jiveVersion to JM 2.4 */
UPDATE jiveVersion SET majorVersion=2, minorVersion=4;
/* jiveGroupUser: Alter length of username column */
ALTER TABLE jiveGroupUser ALTER COLUMN username NVARCHAR(100) NOT NULL;
/* $RCSfile$ */
/* $Revision: 840 $ */
/* $Date: 2005-01-10 01:30:06 -0300 (Mon, 10 Jan 2005) $ */
/* upgrades from Messenger 2.2.x to 2.4.0 */
/* Update jiveVersion to JM 2.4 */
UPDATE jiveVersion SET majorVersion=2, minorVersion=4;
/* jiveGroupUser: Alter length of username column */
ALTER TABLE jiveGroupUser MODIFY username NVARCHAR(100) NOT NULL;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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