PROMPT Creating table group_iata_dests

create table group_iata_dests (
   group_dest                    char(3) not null,
   dest                          char(3) 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 group_iata_dests add ( constraint group_iata_dests_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table group_iata_dests add ( constraint group_iata_dests_uk1 unique (group_dest,dest) using index tablespace &1._indexes);

COMMENT ON TABLE GROUP_IATA_DESTS IS 'This table is used to store DCS bag messages until they can be processed';

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

