portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/sql/ojb oracle-registry-drop.sql oracle-registry.sql
Date Mon, 01 Apr 2002 23:12:21 GMT
taylor      02/04/01 15:12:21

  Modified:    src/sql  dbpsml-schema.sql
  Added:       src/sql/ojb oracle-registry-drop.sql oracle-registry.sql
  Log:
  - registry database DDL - tested on oracle only thus far
  
  Revision  Changes    Path
  1.3       +31 -63    jakarta-jetspeed/src/sql/dbpsml-schema.sql
  
  Index: dbpsml-schema.sql
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/sql/dbpsml-schema.sql,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- dbpsml-schema.sql	27 Feb 2002 21:26:47 -0000	1.2
  +++ dbpsml-schema.sql	1 Apr 2002 23:12:21 -0000	1.3
  @@ -2,98 +2,66 @@
   -----------------------------------------------------------------------------
   -- JETSPEED_USER_PROFILE
   -----------------------------------------------------------------------------
  -DROP TABLE JETSPEED_USER_PROFILE CASCADE CONSTRAINTS;
  -
   CREATE TABLE JETSPEED_USER_PROFILE
   (
  -    PSML_ID INT NOT NULL,
  -    USER_NAME VARCHAR2 (32) NOT NULL,
  -    MEDIA_TYPE VARCHAR2 (99),
  -    LANGUAGE VARCHAR2 (2),
  -    COUNTRY VARCHAR2 (2),
  -    PAGE VARCHAR2 (99),
  -    PROFILE LONG RAW,
  +    PSML_ID integer IDENTITY,
  +    USER_NAME VARCHAR (32),
  +    MEDIA_TYPE VARCHAR (99),
  +    LANGUAGE VARCHAR (2),
  +    COUNTRY VARCHAR (2),
  +    PAGE VARCHAR (99),
  +    PROFILE BINARY,
  +    PRIMARY KEY(PSML_ID),
       UNIQUE (USER_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
   );
   
  -ALTER TABLE JETSPEED_USER_PROFILE
  -    ADD CONSTRAINT JETSPEED_USER_PROFILE_PK 
  -PRIMARY KEY (PSML_ID);
  -
  -
   
   -----------------------------------------------------------------------------
   -- JETSPEED_GROUP_PROFILE
   -----------------------------------------------------------------------------
  -DROP TABLE JETSPEED_GROUP_PROFILE CASCADE CONSTRAINTS;
  -
   CREATE TABLE JETSPEED_GROUP_PROFILE
   (
  -    PSML_ID INT NOT NULL,
  -    GROUP_NAME VARCHAR2 (99) NOT NULL,
  -    MEDIA_TYPE VARCHAR2 (99),
  -    LANGUAGE VARCHAR2 (2),
  -    COUNTRY VARCHAR2 (2),
  -    PAGE VARCHAR2 (99),
  -    PROFILE LONG RAW,
  +    PSML_ID integer IDENTITY,
  +    GROUP_NAME VARCHAR (99),
  +    MEDIA_TYPE VARCHAR (99),
  +    LANGUAGE VARCHAR (2),
  +    COUNTRY VARCHAR (2),
  +    PAGE VARCHAR (99),
  +    PROFILE BINARY,
  +    PRIMARY KEY(PSML_ID),
       UNIQUE (GROUP_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
   );
   
  -ALTER TABLE JETSPEED_GROUP_PROFILE
  -    ADD CONSTRAINT JETSPEED_GROUP_PROFILE_PK 
  -PRIMARY KEY (PSML_ID);
  -
  -
   
   -----------------------------------------------------------------------------
   -- JETSPEED_ROLE_PROFILE
   -----------------------------------------------------------------------------
  -DROP TABLE JETSPEED_ROLE_PROFILE CASCADE CONSTRAINTS;
  -
   CREATE TABLE JETSPEED_ROLE_PROFILE
   (
  -    PSML_ID INT NOT NULL,
  -    ROLE_NAME VARCHAR2 (99) NOT NULL,
  -    MEDIA_TYPE VARCHAR2 (99),
  -    LANGUAGE VARCHAR2 (2),
  -    COUNTRY VARCHAR2 (2),
  -    PAGE VARCHAR2 (99),
  -    PROFILE LONG RAW,
  +    PSML_ID integer IDENTITY,
  +    ROLE_NAME VARCHAR (99),
  +    MEDIA_TYPE VARCHAR (99),
  +    LANGUAGE VARCHAR (2),
  +    COUNTRY VARCHAR (2),
  +    PAGE VARCHAR (99),
  +    PROFILE BINARY,
  +    PRIMARY KEY(PSML_ID),
       UNIQUE (ROLE_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
   );
   
  -ALTER TABLE JETSPEED_ROLE_PROFILE
  -    ADD CONSTRAINT JETSPEED_ROLE_PROFILE_PK 
  -PRIMARY KEY (PSML_ID);
  -
  -
   
   -----------------------------------------------------------------------------
   -- JETSPEED_ANON_PROFILE
   -----------------------------------------------------------------------------
  -DROP TABLE JETSPEED_ANON_PROFILE CASCADE CONSTRAINTS;
  -
   CREATE TABLE JETSPEED_ANON_PROFILE
   (
  -    PSML_ID INT NOT NULL,
  -    MEDIA_TYPE VARCHAR2 (99),
  -    LANGUAGE VARCHAR2 (2),
  -    COUNTRY VARCHAR2 (2),
  -    PAGE VARCHAR2 (99),
  -    PROFILE LONG RAW,
  +    PSML_ID integer IDENTITY,
  +    MEDIA_TYPE VARCHAR (99),
  +    LANGUAGE VARCHAR (2),
  +    COUNTRY VARCHAR (2),
  +    PAGE VARCHAR (99),
  +    PROFILE BINARY,
  +    PRIMARY KEY(PSML_ID),
       UNIQUE (MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
   );
  -
  -ALTER TABLE JETSPEED_ANON_PROFILE
  -    ADD CONSTRAINT JETSPEED_ANON_PROFILE_PK 
  -PRIMARY KEY (PSML_ID);
  -
  -
  -
  -
  -
  -
  -
  -
  -
   
  
  
  
  1.1                  jakarta-jetspeed/src/sql/ojb/oracle-registry-drop.sql
  
  Index: oracle-registry-drop.sql
  ===================================================================
  DROP TABLE OJB_SEQ;
  DROP TABLE OJB_HL_SEQ;
  drop table PORTLET_PARAMETER;
  drop table CONTROL_PARAMETER;
  drop table CONTROLLER_PARAMETER;
  drop table SKIN_PARAMETER;
  drop table CATEGORY;
  drop table PORTLET_MEDIATYPE;
  drop table CONTROL_MEDIATYPE;
  drop table CONTROLLER_MEDIATYPE;
  drop table SKIN;
  drop table MEDIATYPE;
  drop table PORTLET;
  drop table CONTROL;
  drop table CONTROLLER;
  
  
  
  1.1                  jakarta-jetspeed/src/sql/ojb/oracle-registry.sql
  
  Index: oracle-registry.sql
  ===================================================================
  CREATE TABLE OJB_SEQ (
      CLASSNAME    VARCHAR(175) NOT NULL,
      FIELDNAME    VARCHAR(70) NOT NULL,
      LAST_NUM     INT,
      PRIMARY KEY (CLASSNAME, FIELDNAME)
  );
  
  -- create the HIGH/LOW SequenceManager table
  CREATE TABLE OJB_HL_SEQ (
      CLASSNAME    VARCHAR(175) NOT NULL,
      FIELDNAME    VARCHAR(70) NOT NULL,
      MAX_KEY      INT,
      GRAB_SIZE    INT,
      PRIMARY KEY (CLASSNAME, FIELDNAME)
  );
  
  create table PORTLET
  (
      id integer primary key,
      name varchar(128) not null,
      hidden smallint default 0,
      classname varchar(256),
      type varchar(32) not null,
      application smallint default 0,
      parent integer,
      foreign key (parent) references PORTLET(id) on delete cascade,
      -- embedded : content URL
      url varchar(256),
      cachedOnURL smallint default 1,  
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      -- parameters 
      -- media types
      -- categories 
      constraint uk_portlet_name unique(name)
  );
  
  create table CONTROL
  (
      id integer primary key,
      name varchar(128) not null,
      hidden smallint default 0,
      classname varchar(256),                                  
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      -- parameters 
      -- media types
      constraint uk_control_name unique(name)
  );
  
  create table CONTROLLER
  (
      id integer primary key,
      name varchar(128) not null,
      hidden smallint default 0,
      classname varchar(256),                                  
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      -- parameters 
      -- media types
      constraint uk_controller_name unique(name)
  );
  
  create table MEDIATYPE
  (
      id integer primary key,
      name varchar(128) not null,
      hidden smallint default 0,
      mimeType varchar(128) not null,                                  
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      constraint uk_mediatype_name unique(name)
  );
  
  create table SKIN
  (
      id integer primary key,
      name varchar(128) not null,
      hidden smallint default 0,
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      -- parameters 
      constraint uk_skin_name unique(name)
  );
  
  create table PORTLET_PARAMETER
  (
      id integer primary key,
      name varchar(128) not null,
      value varchar(256),
      type varchar(64),
      hidden smallint default 0,                                  
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      cachedOnName smallint default 1,
      cachedOnValue smallint default 1,
      portlet_id integer,
      foreign key (portlet_id) references PORTLET(id) on delete cascade
  );
  
  create table CONTROL_PARAMETER
  (
      id integer primary key,
      name varchar(128) not null,
      value varchar(256),
      type varchar(64),
      hidden smallint default 0,                                 
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      control_id integer,
      foreign key (control_id) references CONTROL(id) on delete cascade
  );
  
  create table CONTROLLER_PARAMETER
  (
      id integer primary key,
      name varchar(128) not null,
      value varchar(256),
      type varchar(64),
      hidden smallint default 0,                                  
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      controller_id integer,
      foreign key (controller_id) references CONTROLLER(id) on delete cascade
  );
  
  create table SKIN_PARAMETER
  (
      id integer primary key,
      name varchar(128) not null,
      value varchar(256),
      type varchar(64),
      hidden smallint default 0,                                  
      -- embedded : security
      role varchar(99),
      -- embedded : metaInfo
      title varchar(128),
      description varchar(256),
      image varchar(128),
      skin_id integer,
      foreign key (skin_id) references SKIN(id) on delete cascade
  );
  
  create table CATEGORY
  (
      id integer primary key,
      name varchar(128) not null,
      groupe varchar(99) not null,
      owner integer,
      foreign key (owner) references PORTLET(id) on delete cascade
  );
  
  CREATE INDEX IX_CATEGORY ON CATEGORY(groupe, name);
  
  create table PORTLET_MEDIATYPE
  (
      id integer not null,
      media_id integer not null
  );
  
  CREATE INDEX IX_PORTLET_MEDIATYPE ON PORTLET_MEDIATYPE(id,media_id);
  
  create table CONTROL_MEDIATYPE
  (
      control_id integer not null,
      media_id integer not null
  );
  
  CREATE INDEX IX_CONTROL_MEDIATYPE ON CONTROL_MEDIATYPE(control_id, media_id);
  
  create table CONTROLLER_MEDIATYPE
  (
      controller_id integer not null,
      media_id integer not null
  );
  
  CREATE INDEX IX_CONTROLLER_MEDIATYPE ON CONTROLLER_MEDIATYPE(controller_id, media_id);
  
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message