   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)
 );
 

  leaf                INTEGER       NOT NULL,
  creationDate        CHAR(15)      NOT NULL,
  modificationDate    CHAR(15)      NOT NULL,
  parent              VARCHAR(100)  NULL,
  deliverPayloads     INTEGER       NOT NULL,
  maxPayloadSize      INTEGER       NULL,
  persistItems        INTEGER       NULL,
  maxItems            INTEGER       NULL,
  notifyConfigChanges INTEGER       NOT NULL,
  notifyDelete        INTEGER       NOT NULL,
  notifyRetract       INTEGER       NOT NULL,

  nodeID              VARCHAR(100)  NOT NULL,
  rosterGroup         VARCHAR(100)  NOT NULL
);
CREATE INDEX pubsubNGrps_idx ON pubsubNodeGroups (serviceID, nodeID);


CREATE TABLE pubsubAffiliation (
  serviceID           VARCHAR(80)  NOT NULL,
  nodeID              VARCHAR(80)  NOT NULL,
  jid                 VARCHAR(90)  NOT NULL,
  affiliation         VARCHAR(10)  NOT NULL,
  CONSTRAINT pubsubAffil_pk PRIMARY KEY (serviceID, nodeID, jid)
);

