[imp] Re: problems with db.oracle

Hernan Morales hernanm@la14.com
Tue, 10 Oct 2000 11:33:26 -0500 (COT)


Hi all..

This is the oracle_create.sql that I used whit IMP/HORDE 2.2.x


-- oracle_create.sql
-- 
-- This script is the same that the previous one(05-APR-99) except for the new
-- active_sessions table definition.
--
-- ============================================================
--   Table : ACTIVE_SESSIONS
--   New Definition by Kevin Hanser
-- ============================================================
create table ACTIVE_SESSIONS
(
    SID       VARCHAR2(32)           not null,
    NAME      VARCHAR2(32)           not null,
    VAL       VARCHAR(4000)          null    ,
    CHANGED   VARCHAR2(14)           not null,
    constraint PK_ACTIVE_SESSIONS primary key (NAME, SID)
)
/

-- ============================================================
--   Index : CHANGED
-- ============================================================
create index CHANGED on ACTIVE_SESSIONS (CHANGED asc)
/


REM TABLE CREATION
REM
REM TABLE
REM      IMP_ADDR
REM      IMP_PREF

REM
PROMPT
PROMPT Creating Table IMP_ADDR
CREATE TABLE imp_addr(
 username                        VARCHAR2(255)              NOT NULL,
 address                         VARCHAR2(255)              NOT NULL,
 nickname                        VARCHAR2(255)              NULL,
 fullname                        VARCHAR2(255)              NULL
)
;

REM
PROMPT
PROMPT Creating Table IMP_PREF
CREATE TABLE imp_pref(
 username                        VARCHAR2(255)              NOT NULL,
 sig                             VARCHAR2(2000)             NULL,
 fullname                        VARCHAR2(70)               NULL,
 replyto                         VARCHAR2(70)               NULL,
 lang                            VARCHAR2(30)               NULL
)
;

REM CONSTRAINT CREATION
REM
REM For application IMP version 1 database
REM
REM CONSTRAINT

PROMPT Adding PRIMARY Constraint To IMP_ADDR Table

ALTER TABLE IMP_ADDR ADD (
      CONSTRAINT PK_IMP_ADDR
      PRIMARY KEY (USERNAME,
                   ADDRESS)
)
/

PROMPT Adding PRIMARY Constraint To IMP_PREF Table

ALTER TABLE IMP_PREF ADD (
      CONSTRAINT PK_IMP_PREF
      PRIMARY KEY (USERNAME)
)
/
 
PROMPT Adding FOREIGN Constraint To IMP_ADDR Table
 
ALTER TABLE IMP_ADDR ADD (
      CONSTRAINT FK_PREF_ADDR
      FOREIGN KEY (USERNAME)
      REFERENCES  IMP_PREF (
                   USERNAME)
)
/
 
REM
REM  End of command file
REM                                                                          

Kevin, Are you agree with this?????

Again, thanks Kevin for your contribution

Bye..



Hernan Morales
Servicios Internet
Almacenes La 14
Cali - Colombia
hernanm@la14.com