-- Licensed Materials - Property of IBM
-- 5724-I68
--
-- (C) Copyright IBM Corp. 2000, 2006
--
-- US Government Users Restricted Rights - Use, duplication, or
-- disclosure restricted by GSA ADP Schedule Contract with IBM Corp.



update command options using c off;

-- ===================================================================
--
-- Table tdis_dsa_dst_attributes
--
-- Table holding name value pairs for item attributes.
-- ===================================================================

drop table tdis_dsa_dst_attributes;
create table tdis_dsa_dst_attributes
( 
    dsa_company_id                bigint,
    dsa_distribution_id           bigint,
    dsa_node_id                   bigint,
    dsa_value                     varchar(3000)
) 

in users index in indx;


drop synonym dsa;
create synonym dsa for tdis_dsa_dst_attributes;

-- ===================================================================
--
-- Table tdis_dst_mkt_distribution
--
-- This table contains the list of distributions that are set up.
-- One company can have multiple distributions for one marketplace
-- ===================================================================

drop table tdis_dst_mkt_distribution;
create table tdis_dst_mkt_distribution
( 
    dst_company_id                bigint,
    dst_distribution_id           bigint,
    dst_distribution_name         varchar(100),
    dst_destination               char,
    dst_type                      char,
    dst_email                     varchar(100),
    dst_hostname                  varchar(100),
    dst_userId                    varchar(100),
    dst_password                  varchar(100),
    dst_path                      varchar(500),
    dst_from                      varchar(100),
    dst_to                        varchar(100),
    dst_sub                       varchar(100),
    dst_localpath                 varchar(500)
) 

in users index in indx;


drop synonym dst;
create synonym dst for tdis_dst_mkt_distribution;

drop sequence qdis_dst_distribution_id restrict;
create sequence qdis_dst_distribution_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tdis_dgp_distribution_group
--

-- ===================================================================

drop table tdis_dgp_distribution_group;
create table tdis_dgp_distribution_group
( 
    dgp_company_id                bigint,
    dgp_distribution_group_id     bigint,
    dgp_distribution_group_name   varchar(100)
) 

in users index in indx;


drop synonym dgp;
create synonym dgp for tdis_dgp_distribution_group;

drop sequence qdis_dgp_distribution_group_id restrict;
create sequence qdis_dgp_distribution_group_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tdis_dgl_distribution_list
--

-- ===================================================================

drop table tdis_dgl_distribution_list;
create table tdis_dgl_distribution_list
( 
    dgl_company_id                bigint,
    dgl_distribution_group_id     bigint,
    dgl_distribution_id           bigint
) 

in users index in indx;


drop synonym dgl;
create synonym dgl for tdis_dgl_distribution_list;



commit;

update command options using c on;

terminate;