/*****************************************************************************
*
* Filename         - $Workfile:   mk_sequences.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         - Create all live schema sequences
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*
*****************************************************************************/

create sequence fltid_gen
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence gmsgid_gen
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence imsgid_gen
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence paxid_gen
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence userid_gen
        start with 2000
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence bag_trace_id
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence uld_trace_id
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence label_trace_id
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence log_id
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence bpmid_gen
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence trolley_uld_no_gen
        start with 1
        increment by 1
        maxvalue 9999
        cycle;
create sequence flight_priv_id
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence user_trace_id
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence kitid_gen
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence flight_info_id
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence lbainfoid_gen
        start with 1
        increment by 1
        maxvalue 9999999999
       cycle;
create sequence bsm_gen
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;

create sequence batch_id_seq
        start with 1
        increment by 1
        maxvalue 9999999999
                cycle;

create sequence load_id_seq
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;
create sequence app_priv_seq
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;

create sequence uld_id_code_seq
      increment by 1
      minvalue 1000000
      maxvalue 9999999
      start with 1000000
      cycle
      order
      cache 5000;

create sequence report_id_gen
  start with 1
  increment by 1
  maxvalue 9999999999
  cycle;

create sequence pmr_id_s
        start with 1
        increment by 1
        maxvalue 9999999999
                cycle;

create sequence eql_id_s
        start with 1
        increment by 1
        maxvalue 9999999999
                cycle;

create sequence kis_id_s
        start with 1
        increment by 1
        maxvalue 9999999999
                cycle;

create sequence unb_id_s
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;

create sequence handler_trace_seq
        start with 1
        increment by 1
        maxvalue 9999999999
        cycle;

create sequence wan_msg_id
        start with 100
        increment by 1
        cache 100
        maxvalue 9999999999
        cycle order;

CREATE SEQUENCE site_info_seq
START WITH 4000
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

PROMPT Creating sequence EVENT_TYPE_ID_SEQ
CREATE SEQUENCE event_type_id_seq
        START WITH 1
        INCREMENT BY 1
        MAXVALUE 9999999999
        CYCLE;

create sequence bagtag_tag_num_seq
  minvalue 1
  maxvalue 999999
  increment by 1
  cycle
  order
  cache 10;

create sequence unknown_bag_id_s
   start with 1
   increment by 1
   maxvalue 9999999999
   cycle;

create sequence gateway_redo_seq
   start with 1
   increment by 1
   maxvalue 4000000000
   nocycle;

CREATE SEQUENCE email_address_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE email_account_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE bag_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE inbound_uld_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE inbound_pax_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE inbound_bag_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE message_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE message_part_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE bmm_route_id_seq
START WITH 1
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

CREATE SEQUENCE rule_id_seq
START WITH 1000
INCREMENT BY 1
MAXVALUE 9999999999
NOCYCLE;

GRANT SELECT ON EQL_ID_S TO ARCH;
GRANT SELECT ON EQL_ID_S TO TEMP;
