/*****************************************************************************
*
* Filename         - $Workfile:   function_id.sql  $
*
*                     Name              Date      Version     CR Number
* Author           - See revision history below.
* Last Update      - See revision history below.
*
* Project Name     - TAGTRAK(Oracle database)
*
* Source Code
* Identifier       - 0/3/300/8010/112
*
* Design Spec
* Section          -
*
* Contents         - Live schema weights table
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1998
*
*****************************************************************************/

PROMPT Creating table FUNCTION_ID

create table function_id ( 
   id                            number(10) not null,
   description                   varchar2(40) not null,
   page_name                     varchar2(50),
   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 function_id add ( constraint function_id_pk primary key (appn_row_id) using index tablespace &1._indexes);

COMMENT ON TABLE FUNCTION_ID IS 'This table contains a list of MWS functions';

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

