/*****************************************************************************
*
* Filename         - $Workfile:   LANGUAGE_TEXTS.sql  $
*
* Author           - Dave Banks
*
* Project Name     - UltraTrak Core 
*
* Source Code
* Identifier       - Database (Master Standby) 
*
* Design Spec
* Section          - 
*
* Contents         - Database script to create table LANGUAGE_TEXTS
*
* Language         - Oracle SQL script      
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 2006
*
*****************************************************************************/

PROMPT Creating Table 'LANGUAGE_TEXTS'
CREATE TABLE LANGUAGE_TEXTS
 (ROW_CREATE_TIME DATE
 ,ROW_DATE_TIME DATE
 ,CUSER VARCHAR2(30)
 ,MUSER VARCHAR2(30)
 ,MTERM VARCHAR2(64)
 ,SOURCE VARCHAR2(8)
 ,TO_BE_ARCHIVED VARCHAR2(1)
 ,APPN_ROW_ID NUMBER(18) NOT NULL
 ,SYSTEM_ID NUMBER(4) DEFAULT 0 NOT NULL
 ,CODE_CATEGORY VARCHAR2(3) NOT NULL
 ,TEXT_CODE VARCHAR2(6) NOT NULL
 ,TEXT_0 VARCHAR2(90)
 ,TEXT_1 VARCHAR2(90)
 ,TEXT_2 VARCHAR2(90)
 ,TEXT_3 VARCHAR2(90)
 ,TEXT_4 VARCHAR2(90)
 ,TEXT_5 VARCHAR2(90)
 ,TEXT_6 VARCHAR2(90)
 ,TEXT_7 VARCHAR2(90)
 ,TEXT_8 VARCHAR2(90)
 ,TEXT_9 VARCHAR2(90)
 ,DISPLAY_ORDER NUMBER(4)
 ,DATABASE_VALUE VARCHAR2(6)
 )
 STORAGE
 (
   INITIAL 5959680
   NEXT 5959680
   PCTINCREASE 0
 ) TABLESPACE APPN_GENERAL_TABLES
/

PROMPT Creating Primary Key on 'LANGUAGE_TEXTS'
ALTER TABLE LANGUAGE_TEXTS
 ADD (CONSTRAINT LANGUAGE_TEXTS_PK PRIMARY KEY
  (APPN_ROW_ID)
 USING INDEX
 STORAGE
 (
   INITIAL 847872
   NEXT 847872
   PCTINCREASE 0
 ) TABLESPACE APPN_GENERAL_IDXS)
/

PROMPT Creating Unique Key on 'LANGUAGE_TEXTS'
ALTER TABLE LANGUAGE_TEXTS
 ADD (CONSTRAINT LANGUAGE_TEXTS_UK1 UNIQUE
  (SYSTEM_ID
  ,CODE_CATEGORY
  ,TEXT_CODE)
 USING INDEX
 STORAGE
 (
   INITIAL 995328
   NEXT 995328
   PCTINCREASE 0
 ) TABLESPACE APPN_GENERAL_IDXS)
/


