-- IBM Confidential
-- OCO Source Materials
-- 5724-I68.
-- (C) Copyright IBM Corp. 2000, 2004 - All Rights Reserved.
-- US Government Users Restricted Rights - Use, duplication or disclosure 
-- restricted by GSA ADP Schedule Contract with IBM Corp. 
-- This file is generated by GenSchema!! DO NOT EDIT!!!
-- This file is generated by GenSchema!! DO NOT EDIT!!!



update command options using c off;

-- ===================================================================
--
-- Table ttrx_txn_transaction
--
-- Primary key table for GDS transaction
-- ===================================================================

drop table ttrx_txn_transaction;
create table ttrx_txn_transaction
( 
    txn_company_id                bigint not null,
    txn_transaction_id            varchar(100) not null,
    txn_description               varchar(1000),
    constraint txn_0_pk
        primary key (txn_transaction_id, txn_company_id)
) 

in users index in indx;


drop synonym txn;
create synonym txn for ttrx_txn_transaction;

-- ===================================================================
--
-- Table ttrx_txd_transaction_details
--
-- Contains information about GDS transaction
-- ===================================================================

drop table ttrx_txd_transaction_details;
create table ttrx_txd_transaction_details
( 
    txd_company_id                bigint,
    txd_id                        bigint not null,
    txd_transaction_id            varchar(100),
    txd_entry_id                  varchar(200),
    txd_step_id                   varchar(100),
    txd_transaction_time          timestamp,
    txd_date_flag                 char(1),
    txd_version_id                varchar(100),
    txd_workflow_name             varchar(200),
    txd_step_name                 varchar(200),
    txd_status                    varchar(1000),
    txd_user_action               varchar(100),
    txd_user_id                   bigint,
    txd_type                      varchar(100),
    constraint txd_0_pk
        primary key (txd_id)
) 

in users index in indx;


drop synonym txd;
create synonym txd for ttrx_txd_transaction_details;

drop sequence qtrx_txd_id restrict;
create sequence qtrx_txd_id start with 1 increment by 1 nocache;

-- ===================================================================
--
-- Table ttrx_txm_transaction_message
--
-- Contains information about GDS message
-- ===================================================================

drop table ttrx_txm_transaction_message;
create table ttrx_txm_transaction_message
( 
    txm_company_id                bigint,
    txm_txd_id                    bigint,
    txm_transaction_id            varchar(100),
    txm_message_id                varchar(100),
    txm_message_description       varchar(1000),
    txm_message_type              varchar(100),
    txm_gtin                      varchar(100),
    txm_cascade_option            varchar(100),
    txm_data_pool                 varchar(200),
    txm_message_status            varchar(100),
    txm_doc_store_path            varchar(200),
    txm_message_action            varchar(100),
    txm_target_market             varchar(2),
    txm_info_provider             varchar(100),
    txm_ip_name                   varchar(200),
    txm_target_gln                varchar(100),
    txm_object_type               varchar(100),
    txm_message_source            varchar(100),
    txm_queue_name                varchar(100)
) 

in users index in indx;


drop synonym txm;
create synonym txm for ttrx_txm_transaction_message;

-- ===================================================================
--
-- Table ttrx_txi_tradeitem
--
-- Primary key table to store trade item info
-- ===================================================================

drop table ttrx_txi_tradeitem;
create table ttrx_txi_tradeitem
( 
    txi_company_id                bigint not null,
    txi_gtin                      varchar(100) not null,
    txi_gtin_name                 varchar(200),
    txi_gtin_internal_cat_id      varchar(100),
    txi_gtin_udex_cat_id          varchar(100),
    constraint txi_0_pk
        primary key (txi_gtin, txi_company_id)
) 

in users index in indx;


drop synonym txi;
create synonym txi for ttrx_txi_tradeitem;

-- ===================================================================
--
-- Table ttrx_txl_tradeitemlink
--
-- Contains information about GDS transaction related to trade item link
-- ===================================================================

drop table ttrx_txl_tradeitemlink;
create table ttrx_txl_tradeitemlink
( 
    txl_company_id                bigint,
    txl_txd_id                    bigint,
    txl_parent_gtin               varchar(100),
    txl_child_gtin                varchar(100),
    txl_response_vo_path          varchar(1000)
) 

in users index in indx;


drop synonym txl;
create synonym txl for ttrx_txl_tradeitemlink;

-- ===================================================================
--
-- Table ttrx_txp_transaction_tp
--
-- Contains information about GDS transaction related to trading partner
-- ===================================================================

drop table ttrx_txp_transaction_tp;
create table ttrx_txp_transaction_tp
( 
    txp_company_id                bigint,
    txp_txd_id                    bigint,
    txp_gln                       varchar(100)
) 

in users index in indx;


drop synonym txp;
create synonym txp for ttrx_txp_transaction_tp;

-- ===================================================================
--
-- Table ttrx_ttp_tradingpartner
--
-- Primary key table to store trading partner info
-- ===================================================================

drop table ttrx_ttp_tradingpartner;
create table ttrx_ttp_tradingpartner
( 
    ttp_company_id                bigint not null,
    ttp_gln                       varchar(100) not null,
    ttp_name                      varchar(200),
    constraint ttp_0_pk
        primary key (ttp_gln, ttp_company_id)
) 

in users index in indx;


drop synonym ttp;
create synonym ttp for ttrx_ttp_tradingpartner;

-- ===================================================================
--
-- Table ttrx_txf_filter
--
-- Contains information about GDS transaction related to filter
-- ===================================================================

drop table ttrx_txf_filter;
create table ttrx_txf_filter
( 
    txf_company_id                bigint,
    txf_txd_id                    bigint,
    txf_filter_name               varchar(100)
) 

in users index in indx;


drop synonym txf;
create synonym txf for ttrx_txf_filter;

-- ===================================================================
--
-- Table ttrx_txs_subscription
--
-- Contains information about GDS transaction related to Subscription
-- ===================================================================

drop table ttrx_txs_subscription;
create table ttrx_txs_subscription
( 
    txs_company_id                bigint,
    txs_txd_id                    bigint,
    txs_subscription_id           varchar(100),
    txs_subscription_name         varchar(200)
) 

in users index in indx;


drop synonym txs;
create synonym txs for ttrx_txs_subscription;



commit;

update command options using c on;

terminate;