   subscriptionEnabled INTEGER       NOT NULL,
   configSubscription  INTEGER       NOT NULL,
   accessModel         VARCHAR(10)   NOT NULL,
-  payloadType         VARCHAR(100)  NULL,
-  bodyXSLT            VARCHAR(100)  NULL,
-  dataformXSLT        VARCHAR(100)  NULL,
+  payloadType         VARCHAR(100),
+  bodyXSLT            VARCHAR(100),
+  dataformXSLT        VARCHAR(100),
   creator             VARCHAR(1024) NOT NULL,
-  description         VARCHAR(255)  NULL,
-  language            VARCHAR(255)  NULL,
-  name                VARCHAR(50)   NULL,
-  replyPolicy         VARCHAR(15)   NULL,
-  associationPolicy   VARCHAR(15)   NULL,
-  maxLeafNodes        INTEGER       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 TABLE pubsubNodeJIDs (
-  serviceID           VARCHAR(100)  NOT NULL,
-  nodeID              VARCHAR(100)  NOT NULL,
-  jid                 VARCHAR(1024) NOT NULL,
-  associationType     VARCHAR(20)   NOT NULL,
+  serviceID           VARCHAR(80)  NOT NULL,
+  nodeID              VARCHAR(80)  NOT NULL,
+  jid                 VARCHAR(90)  NOT NULL,
+  associationType     VARCHAR(20)  NOT NULL,
   CONSTRAINT pubsubJID_pk PRIMARY KEY (serviceID, nodeID, jid)
 );
 

CREATE 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) NULL,
  CONSTRAINT pubsubItem_pk PRIMARY KEY (serviceID, nodeID, id)
);


CREATE 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)      NULL,
  includeBody         INTEGER       NOT NULL,
  showValues          VARCHAR(30)   NOT NULL,
  subscriptionType    VARCHAR(10)   NOT NULL,
  subscriptionDepth   INTEGER       NOT NULL,
  keyword             VARCHAR(200)  NULL,
  CONSTRAINT pubsubSubs_pk PRIMARY KEY (serviceID, nodeID, id)
);


  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)
