-- 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!!!


-- ===================================================================
--
-- Table tper_mdl_modules
--
-- The sequence for the primary key for the mdl table is always an even number
-- The sequence for the primary key for the prf table is always an odd number
-- This is to facilitate the distinction between modules and module instances during GUI magic
-- ===================================================================

drop table tper_mdl_modules cascade constraints;
create table tper_mdl_modules
( 
    mdl_module_id                 number(9, 0) not null,
    mdl_module_name               varchar2(100),
    mdl_width                     char,
    mdl_customizable              char,
    mdl_class_name                varchar2(100),
    constraint mdl_0_pk
        primary key (mdl_module_id)
) 
tablespace users;


drop synonym mdl;
create synonym mdl for tper_mdl_modules;

-- ===================================================================
--
-- Table tper_pag_pages
--

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

drop table tper_pag_pages cascade constraints;
create table tper_pag_pages
( 
    pag_company_id                number(9, 0),
    pag_user_id                   number(9, 0),
    pag_page_id                   number(9, 0) not null,
    pag_page_name                 varchar2(100),
    constraint pag_0_pk
        primary key (pag_page_id)
) 
tablespace users;


drop synonym pag;
create synonym pag for tper_pag_pages;

drop sequence qper_pag_page_id;
create sequence qper_pag_page_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tper_prf_preferences
--
-- The sequence for the primary key for the mdl table is always an even number
-- The sequence for the primary key for the prf table is always an odd number
-- This is to facilitate the distinction between modules and module instances during GUI magic
-- ===================================================================

drop table tper_prf_preferences cascade constraints;
create table tper_prf_preferences
( 
    prf_company_id                number(9, 0),
    prf_instance_id               number(9, 0) not null,
    prf_page_id                   number(9, 0),
    prf_module_id                 number(9, 0),
    prf_order                     number(9, 0),
    prf_minimized                 number(1, 0),
    constraint prf_0_pk
        primary key (prf_instance_id)
) 
tablespace users;


drop synonym prf;
create synonym prf for tper_prf_preferences;

drop sequence qper_prf_instance_id;
create sequence qper_prf_instance_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tper_par_params
--

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

drop table tper_par_params cascade constraints;
create table tper_par_params
( 
    par_company_id                number(9, 0),
    par_instance_id               number(9, 0),
    par_display_name              varchar2(100),
    par_param_value               varchar2(1000)
) 
tablespace users;


drop synonym par;
create synonym par for tper_par_params;

-- ===================================================================
--
-- Table tper_lft_leftnav
--
-- Data for the left nav bar
-- ===================================================================

drop table tper_lft_leftnav cascade constraints;
create table tper_lft_leftnav
( 
    lft_window_id                 number(9, 0) not null,
    lft_company_id                number(9, 0) not null,
    lft_user_id                   number(9, 0) not null,
    lft_module_moniker            varchar2(256),
    lft_module_state              varchar2(1000),
    lft_window_maximized          char,
    lft_window_prev               number(9, 0) not null,
    lft_window_next               number(9, 0) not null,
    constraint lft_0_pk
        primary key (lft_window_id),
    constraint lft_1_uk
        unique (lft_company_id, lft_user_id, lft_window_prev),
    constraint lft_2_uk
        unique (lft_company_id, lft_user_id, lft_window_next)
) 
tablespace users;


drop synonym lft;
create synonym lft for tper_lft_leftnav;

drop sequence qper_lft_window_id;
create sequence qper_lft_window_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tper_ucs_user_console_setting
--
-- Data for the console specific user settings including default sorting column,
-- hidden columns and rows per page.
-- ===================================================================

drop table tper_ucs_user_console_setting cascade constraints;
create table tper_ucs_user_console_setting
( 
    ucs_company_id                number(9, 0) not null,
    ucs_user_id                   number(9, 0) not null,
    ucs_console_id                varchar2(100) not null,
    ucs_page_size                 number(9, 0),
    ucs_sort_data                 varchar2(1000),
    ucs_search_data               varchar2(1000),
    ucs_hide_columns              varchar2(1000),
    constraint ucs_0_uk
        unique (ucs_console_id, ucs_user_id, ucs_company_id)
) 
tablespace users;


drop synonym ucs;
create synonym ucs for tper_ucs_user_console_setting;

drop sequence qper_mdl_module_id;
create sequence qper_mdl_module_id start with 1 increment by 2 nocache;
drop sequence qper_prf_instance_id;
create sequence qper_prf_instance_id start with 2 increment by 2 nocache;


