/*****************************************************************************
*
* Filename         - $Workfile:   prg_fids_info.sql  $
*
*                     Name: Yomi Kogbe    Date: 08/06/00  Version1.0     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 TABLE
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*
*****************************************************************************/

PROMPT Creating table PRG_FIDS_INFO

create table prg_fids_info (
   id                            number      ,
   timestamp                     date        ,
   flight_no                     char(8)not null,
   flight_date                   char(5)not null,
   flight_dest                   char(3)not null,
   gate                          char(4),
   scheduled                     char(4),
   estimate                      char(4),
   blockoff                      char(4),
   runway                        char(4),
   direction                     char(1),
   flight_code3                  char(3),
   flight_code2                  char(2),
   flight_number                 char(5),
   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 prg_fids_info add ( constraint prg_fids_info_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table prg_fids_info add ( constraint prg_fids_info_uk1 unique (id) using index tablespace &1._indexes);

alter table prg_fids_info add ( constraint prg_info_chk_dir check ( direction in ('D', 'A') ));

COMMENT ON TABLE PRG_FIDS_INFO IS 'This table contains flight information for Prague';

COMMENT ON COLUMN PRG_FIDS_INFO.BLOCKOFF IS  'Off blocks time';
COMMENT ON COLUMN PRG_FIDS_INFO.DIRECTION IS  'Flight direction';
COMMENT ON COLUMN PRG_FIDS_INFO.ESTIMATE IS  'Estimated time of departure';
COMMENT ON COLUMN PRG_FIDS_INFO.FLIGHT_CODE2 IS  'Flight code 2';
COMMENT ON COLUMN PRG_FIDS_INFO.FLIGHT_CODE3 IS  'Flight code 3';
COMMENT ON COLUMN PRG_FIDS_INFO.FLIGHT_DATE IS  'Flight date';
COMMENT ON COLUMN PRG_FIDS_INFO.FLIGHT_DEST IS  'Flight destination';
COMMENT ON COLUMN PRG_FIDS_INFO.FLIGHT_NO IS  'Flight number';
COMMENT ON COLUMN PRG_FIDS_INFO.FLIGHT_NUMBER IS  'Flight number';
COMMENT ON COLUMN PRG_FIDS_INFO.GATE IS  'Gate number';
COMMENT ON COLUMN PRG_FIDS_INFO.ID IS  'Unique identifier';
COMMENT ON COLUMN PRG_FIDS_INFO.RUNWAY IS  'Runway';
COMMENT ON COLUMN PRG_FIDS_INFO.SCHEDULED IS  'Scheduled time of departure';
COMMENT ON COLUMN PRG_FIDS_INFO.TIMESTAMP IS  'Time row was created';
COMMENT ON COLUMN PRG_FIDS_INFO.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN PRG_FIDS_INFO.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN PRG_FIDS_INFO.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN PRG_FIDS_INFO.CUSER IS 'The user who created the row';
COMMENT ON COLUMN PRG_FIDS_INFO.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN PRG_FIDS_INFO.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN PRG_FIDS_INFO.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN PRG_FIDS_INFO.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN PRG_FIDS_INFO.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';

