/*****************************************************************************
*
* Filename         - $Workfile:   bag_descriptive_elements.sql  $
*
* Author           - Daniel Jones
*
* Project Name     - UltraTrak (Oracle Database)
*
* Contents         - Live Schema: bag_descriptive_elements table
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 2008
*
*****************************************************************************/

PROMPT Creating table BAG_DESCRIPTIVE_ELEMENTS

CREATE TABLE bag_descriptive_elements (
   code				   VARCHAR2(2)    NOT NULL,
   description                   VARCHAR2(200)  NOT NULL,
   element_type			   VARCHAR2(1)	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 bag_descriptive_elements add ( constraint bag_descriptive_elements_pk primary key (appn_row_id) using index tablespace &1._indexes);

COMMENT ON TABLE BAG_DESCRIPTIVE_ELEMENTS IS 'This table contains valid bag descriptive elements';

COMMENT ON COLUMN BAG_DESCRIPTIVE_ELEMENTS.CODE IS 'The Descriptive Code';
COMMENT ON COLUMN BAG_DESCRIPTIVE_ELEMENTS.DESCRIPTION IS 'Description of the Code';
COMMENT ON COLUMN BAG_DESCRIPTIVE_ELEMENTS.ELEMENT_TYPE IS 'The Type of Descriptive Element (e.g. Material, External, Basic)';
