CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE JIVEUSER(USERNAME VARCHAR(64) NOT NULL,PASSWORD VARCHAR(32),ENCRYPTEDPASSWORD VARCHAR(255),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 MEMORY TABLE JIVEUSERPROP(USERNAME VARCHAR(64) NOT NULL,NAME VARCHAR(100) NOT NULL,PROPVALUE VARCHAR(4000) NOT NULL,CONSTRAINT JIVEUSERPROP_PK PRIMARY KEY(USERNAME,NAME))
CREATE MEMORY TABLE JIVEPRIVATE(USERNAME VARCHAR(64) 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 MEMORY TABLE JIVEOFFLINE(USERNAME VARCHAR(64) 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 MEMORY TABLE JIVEROSTER(ROSTERID BIGINT NOT NULL,USERNAME VARCHAR(64) 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 MEMORY 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 MEMORY TABLE JIVEVCARD(USERNAME VARCHAR(64) NOT NULL,VALUE LONGVARCHAR NOT NULL,CONSTRAINT JIVEVCARD_PK PRIMARY KEY(USERNAME))
CREATE MEMORY TABLE JIVEGROUP(GROUPNAME VARCHAR(50) NOT NULL,DESCRIPTION VARCHAR(255),CONSTRAINT JIVEGROUP_PK PRIMARY KEY(GROUPNAME))
CREATE MEMORY 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 MEMORY TABLE JIVEGROUPUSER(GROUPNAME VARCHAR(50) NOT NULL,USERNAME VARCHAR(100) NOT NULL,ADMINISTRATOR INTEGER NOT NULL,CONSTRAINT JIVEGROUPUSER_PK PRIMARY KEY(GROUPNAME,USERNAME,ADMINISTRATOR))
CREATE MEMORY TABLE JIVEID(IDTYPE INTEGER NOT NULL,ID BIGINT NOT NULL,CONSTRAINT JIVEID_PK PRIMARY KEY(IDTYPE))
CREATE MEMORY TABLE JIVEPROPERTY(NAME VARCHAR(100) NOT NULL,PROPVALUE VARCHAR(4000) NOT NULL,CONSTRAINT JIVEPROPERTY_PK PRIMARY KEY(NAME))
CREATE MEMORY TABLE JIVEVERSION(NAME VARCHAR(50) NOT NULL,VERSION INTEGER NOT NULL,CONSTRAINT JIVEVERSION_PK PRIMARY KEY(NAME))
CREATE MEMORY TABLE JIVEEXTCOMPONENTCONF(SUBDOMAIN VARCHAR(255) NOT NULL,SECRET VARCHAR(255),PERMISSION VARCHAR(10) NOT NULL,CONSTRAINT JIVEEXTCOMPONENTCONF_PK PRIMARY KEY(SUBDOMAIN))
CREATE MEMORY TABLE JIVEREMOTESERVERCONF(DOMAIN VARCHAR(255) NOT NULL,REMOTEPORT INTEGER,PERMISSION VARCHAR(10) NOT NULL,CONSTRAINT JIVEREMOTESERVERCONF_PK PRIMARY KEY(DOMAIN))
CREATE MEMORY TABLE JIVEPRIVACYLIST(USERNAME VARCHAR(64) NOT NULL,NAME VARCHAR(100) NOT NULL,ISDEFAULT INTEGER NOT NULL,LIST LONGVARCHAR NOT NULL,CONSTRAINT JIVEPRIVACYLIST_PK PRIMARY KEY(USERNAME,NAME))
CREATE INDEX JIVEPLIST_DEFAULT_IDX ON JIVEPRIVACYLIST(USERNAME,ISDEFAULT)
CREATE MEMORY TABLE JIVESASLAUTHORIZED(USERNAME VARCHAR(64) NOT NULL,PRINCIPAL VARCHAR(4000) NOT NULL,CONSTRAINT JIVESASLAUTHORIZED_PK PRIMARY KEY(USERNAME,PRINCIPAL))
CREATE MEMORY 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),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),CANDISCOVERJID INTEGER NOT NULL,LOGENABLED INTEGER NOT NULL,SUBJECT VARCHAR(100),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 MEMORY TABLE MUCROOMPROP(ROOMID BIGINT NOT NULL,NAME VARCHAR(100) NOT NULL,PROPVALUE VARCHAR(4000) NOT NULL,CONSTRAINT MUCROOMPROP_PK PRIMARY KEY(ROOMID,NAME))
CREATE MEMORY TABLE MUCAFFILIATION(ROOMID BIGINT NOT NULL,JID VARCHAR(1024) NOT NULL,AFFILIATION INTEGER NOT NULL,CONSTRAINT MUCAFFILIATION_PK PRIMARY KEY(ROOMID,JID))
CREATE MEMORY TABLE MUCMEMBER(ROOMID BIGINT NOT NULL,JID VARCHAR(1024) NOT NULL,NICKNAME VARCHAR(255),FIRSTNAME VARCHAR(100),LASTNAME VARCHAR(100),URL VARCHAR(100),EMAIL VARCHAR(100),FAQENTRY VARCHAR(100),CONSTRAINT MUCMEMBER_PK PRIMARY KEY(ROOMID,JID))
CREATE MEMORY TABLE MUCCONVERSATIONLOG(ROOMID BIGINT NOT NULL,SENDER VARCHAR(1024) NOT NULL,NICKNAME VARCHAR(255),TIME CHAR(15) NOT NULL,SUBJECT VARCHAR(255),BODY LONGVARCHAR)
CREATE INDEX MUCLOG_TIME_IDX ON MUCCONVERSATIONLOG(TIME)
CREATE MEMORY TABLE PUBSUBNODE(SERVICEID VARCHAR(100) NOT NULL,NODEID VARCHAR(100) NOT NULL,LEAF INTEGER NOT NULL,CREATIONDATE CHAR(15) NOT NULL,MODIFICATIONDATE CHAR(15) NOT NULL,PARENT VARCHAR(100),DELIVERPAYLOADS INTEGER NOT NULL,MAXPAYLOADSIZE INTEGER,PERSISTITEMS INTEGER,MAXITEMS INTEGER,NOTIFYCONFIGCHANGES INTEGER NOT NULL,NOTIFYDELETE INTEGER NOT NULL,NOTIFYRETRACT INTEGER NOT NULL,PRESENCEBASED INTEGER NOT NULL,SENDITEMSUBSCRIBE INTEGER NOT NULL,PUBLISHERMODEL VARCHAR(15) NOT NULL,SUBSCRIPTIONENABLED INTEGER NOT NULL,CONFIGSUBSCRIPTION INTEGER NOT NULL,ACCESSMODEL VARCHAR(10) NOT NULL,PAYLOADTYPE VARCHAR(100),BODYXSLT VARCHAR(100),DATAFORMXSLT VARCHAR(100),CREATOR VARCHAR(1024) NOT NULL,DESCRIPTION VARCHAR(255),LANGUAGE VARCHAR(255),NAME VARCHAR(50),REPLYPOLICY VARCHAR(15),ASSOCIATIONPOLICY VARCHAR(15),MAXLEAFNODES INTEGER,CONSTRAINT PUBSUBNODE_PK PRIMARY KEY(SERVICEID,NODEID))
CREATE MEMORY TABLE PUBSUBNODEJIDS(SERVICEID VARCHAR(100) NOT NULL,NODEID VARCHAR(100) NOT NULL,JID VARCHAR(1024) NOT NULL,ASSOCIATIONTYPE VARCHAR(20) NOT NULL,CONSTRAINT PUBSUBJID_PK PRIMARY KEY(SERVICEID,NODEID,JID))
CREATE MEMORY TABLE PUBSUBNODEGROUPS(SERVICEID VARCHAR(100) NOT NULL,NODEID VARCHAR(100) NOT NULL,ROSTERGROUP VARCHAR(100) NOT NULL)
CREATE INDEX PUBSUBNODEGROUPS_IDX ON PUBSUBNODEGROUPS(SERVICEID,NODEID)
CREATE MEMORY TABLE PUBSUBAFFILIATION(SERVICEID VARCHAR(100) NOT NULL,NODEID VARCHAR(100) NOT NULL,JID VARCHAR(1024) NOT NULL,AFFILIATION VARCHAR(10) NOT NULL,CONSTRAINT PUBSUBAFFIL_PK PRIMARY KEY(SERVICEID,NODEID,JID))
CREATE MEMORY TABLE PUBSUBITEM(SERVICEID VARCHAR(100) NOT NULL,NODEID VARCHAR(100) NOT NULL,ID VARCHAR(100) NOT NULL,JID VARCHAR(1024) NOT NULL,CREATIONDATE CHAR(15) NOT NULL,PAYLOAD VARCHAR(4000),CONSTRAINT PUBSUBITEM_PK PRIMARY KEY(SERVICEID,NODEID,ID))
CREATE MEMORY TABLE PUBSUBSUBSCRIPTION(SERVICEID VARCHAR(100) NOT NULL,NODEID VARCHAR(100) NOT NULL,ID VARCHAR(100) NOT NULL,JID VARCHAR(1024) NOT NULL,OWNER VARCHAR(1024) NOT NULL,STATE VARCHAR(15) NOT NULL,DELIVER INTEGER NOT NULL,DIGEST INTEGER NOT NULL,DIGEST_FREQUENCY INTEGER NOT NULL,EXPIRE CHAR(15),INCLUDEBODY INTEGER NOT NULL,SHOWVALUES VARCHAR(30) NOT NULL,SUBSCRIPTIONTYPE VARCHAR(10) NOT NULL,SUBSCRIPTIONDEPTH INTEGER NOT NULL,KEYWORD VARCHAR(200),CONSTRAINT PUBSUBSUBS_PK PRIMARY KEY(SERVICEID,NODEID,ID))
CREATE MEMORY TABLE PUBSUBDEFAULTCONF(SERVICEID VARCHAR(100) NOT NULL,LEAF INTEGER NOT NULL,DELIVERPAYLOADS INTEGER NOT NULL,MAXPAYLOADSIZE INTEGER NOT NULL,PERSISTITEMS INTEGER NOT NULL,MAXITEMS INTEGER NOT NULL,NOTIFYCONFIGCHANGES INTEGER NOT NULL,NOTIFYDELETE INTEGER NOT NULL,NOTIFYRETRACT INTEGER NOT NULL,PRESENCEBASED INTEGER NOT NULL,SENDITEMSUBSCRIBE INTEGER NOT NULL,PUBLISHERMODEL VARCHAR(15) NOT NULL,SUBSCRIPTIONENABLED INTEGER NOT NULL,ACCESSMODEL VARCHAR(10) NOT NULL,LANGUAGE VARCHAR(255),REPLYPOLICY VARCHAR(15),ASSOCIATIONPOLICY VARCHAR(15) NOT NULL,MAXLEAFNODES INTEGER NOT NULL,CONSTRAINT PUBSUBDEFCONF_PK PRIMARY KEY(SERVICEID,LEAF))
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 20
SET SCHEMA PUBLIC
INSERT INTO JIVEUSER VALUES('admin','admin',NULL,'Administrator','admin@example.com','001160771782343','0')
INSERT INTO JIVEID VALUES(18,1)
INSERT INTO JIVEID VALUES(19,1)
INSERT INTO JIVEID VALUES(23,1)
INSERT INTO JIVEPROPERTY VALUES('xmpp.auth.anonymous','true')
INSERT INTO JIVEPROPERTY VALUES('xmpp.domain','localhost')
INSERT INTO JIVEPROPERTY VALUES('xmpp.muc.history.type','number')
INSERT INTO JIVEPROPERTY VALUES('xmpp.session.conflict-limit','0')
INSERT INTO JIVEPROPERTY VALUES('xmpp.socket.ssl.active','true')
INSERT INTO JIVEVERSION VALUES('wildfire',10)
INSERT INTO PUBSUBNODE VALUES('pubsub','',0,'001160771783203','001160771783203',NULL,0,0,0,0,1,1,1,0,0,'publishers',1,0,'open','','','','admin@localhost','','English','',NULL,'all',-1)
INSERT INTO PUBSUBAFFILIATION VALUES('pubsub','','admin@localhost','owner')
INSERT INTO PUBSUBSUBSCRIPTION VALUES('pubsub','','j606VYMfTW99CAkvfsfOAO1m99JTKW0gxaaGq96X','admin@localhost','admin@localhost','subscribed',1,0,86400000,NULL,0,' ','nodes',1,NULL)
INSERT INTO PUBSUBDEFAULTCONF VALUES('pubsub',0,0,0,0,0,1,1,1,0,0,'publishers',1,'open','English',NULL,'all',-1)
INSERT INTO PUBSUBDEFAULTCONF VALUES('pubsub',1,1,5120,0,-1,1,1,1,0,1,'publishers',1,'open','English',NULL,'all',-1)
