
/*****************************************************************************
*
* Filename         - $Workfile:   $
*
*                     Name              Date      Version     CR Number
* Author           - See revision history below.
* Last Update      - See revision history below.
*
* Project Name     - TAGTRAK(Oracle Database)
*
* Source Code
* Identifier       - 
*
* Design Spec
* Section          - 
*
* Contents         - Live Schema: KIT_STATUS table and associated items
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 2003
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   $  $Revision:   $
*
* Revision History
*
* Note that user tagtrak is many users. For these users the user
* name is entered as the last line in the change description.
*
* $Log:   $
*
****************************************************************************/

PROMPT Creating table KIT_STATUS

create table KIT_STATUS (
   KIS_ID                        number(10) not null,
   KIS_STATUS                    varchar2(15) not null,
   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
);

alter table kit_status add ( constraint kit_status_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table KIT_STATUS add ( constraint kit_status_uk1 unique ( KIS_ID ) using index tablespace &1._indexes);

COMMENT ON TABLE KIT_STATUS IS 'This table contains a list of valid kit statuses';

COMMENT ON COLUMN KIT_STATUS.KIS_ID IS  'Unique identifier';
COMMENT ON COLUMN KIT_STATUS.KIS_STATUS IS  'Status';
COMMENT ON COLUMN KIT_STATUS.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN KIT_STATUS.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN KIT_STATUS.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN KIT_STATUS.CUSER IS 'The user who created the row';
COMMENT ON COLUMN KIT_STATUS.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN KIT_STATUS.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN KIT_STATUS.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN KIT_STATUS.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN KIT_STATUS.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';
