
    create table address (
        id bigint not null,
        addr_id int not null,
        street varchar,
        city varchar,
        state varchar,
        zip_code varchar,
        addr_type varchar,
        primary key (id)
    );

    create table book (
        id bigint not null,
        book_id int not null,
        book_title varchar,
        publisher varchar,
        isbn varchar,
        on_hand_qty int,
        cost numeric(38,2),
        pub_date date,
        author_id int,
        sold_qty int,
        price numeric(38,2),
        primary key (id)
    );

    create table cs_test (
        id bigint not null,
        test varchar,
        pos int,
        primary key (id)
    );

    create table cust (
        id bigint not null,
        p2j numeric(38,2),
        primary key (id)
    );

    create table customer (
        id bigint not null,
        unique2 int,
        customer int,
        description date,
        uniq bit,
        primary key (id)
    );

    create table p2j_test (
        id bigint not null,
        customer varchar,
        description varchar,
        unique1 int,
        p2j date,
        primary key (id)
    );

    create table pers_addr (
        id bigint not null,
        site_id int not null,
        emp_num int not null,
        addr_id int not null,
        link_type varchar,
        active bit,
        primary key (id)
    );

    create table person (
        id bigint not null,
        site_id int not null,
        emp_num int not null,
        first_name varchar,
        last_name varchar,
        middle_init varchar,
        ssn varchar not null,
        pay_type varchar,
        hire_date date,
        term_date date,
        comments varchar,
        area_code varchar,
        phone_number varchar,
        extension varchar,
        primary key (id)
    );

    create table person__5 (
        parent__id bigint not null,
        schedule varchar,
        hours int,
        list__index int not null,
        primary key (parent__id, list__index)
    );

    create table simple (
        id bigint not null,
        number int not null,
        description varchar,
        primary key (id)
    );

    create table vehicle (
        id bigint not null,
        make varchar not null,
        model varchar not null,
        axles int,
        ext_color varchar,
        vin_number varchar not null,
        primary key (id)
    );

    create table vehicle__10 (
        parent__id bigint not null,
        options varchar,
        list__index int not null,
        primary key (parent__id, list__index)
    );

    create table vehicle_driver (
        id bigint not null,
        name varchar not null,
        age int,
        vin_number varchar not null,
        primary key (id)
    );

    create table vehicle_owner (
        id bigint not null,
        name varchar not null,
        vin_number varchar not null,
        price numeric(38,2),
        primary key (id)
    );

    create index person__5_fkey on person__5 (parent__id);

    alter table person__5 
        add constraint FK32DA98E05395E213 
        foreign key (parent__id) 
        references person;

    create index vehicle__10_fkey on vehicle__10 (parent__id);

    alter table vehicle__10 
        add constraint FKC9CB32BFB4620D8 
        foreign key (parent__id) 
        references vehicle;
alter table address add __city as upper(rtrim(city));
alter table address add __state as upper(rtrim(state));
alter table address add __zip_code as upper(rtrim(zip_code));
alter table book add __publisher as upper(rtrim(publisher));
alter table book add __isbn as upper(rtrim(isbn));
alter table pers_addr add __link_type as upper(rtrim(link_type));
alter table person add __first_name as upper(rtrim(first_name));
alter table person add __last_name as upper(rtrim(last_name));
alter table person add __middle_init as upper(rtrim(middle_init));
alter table person add __ssn as upper(rtrim(ssn));
alter table person add __pay_type as upper(rtrim(pay_type));
alter table person add __area_code as upper(rtrim(area_code));
alter table person add __phone_number as upper(rtrim(phone_number));
alter table person add __extension as upper(rtrim(extension));
alter table vehicle add __make as upper(rtrim(make));
alter table vehicle add __model as upper(rtrim(model));
alter table vehicle add __vin_number as upper(rtrim(vin_number));
alter table vehicle_driver add __name as upper(rtrim(name));
alter table vehicle_driver add __vin_number as upper(rtrim(vin_number));
alter table vehicle_owner add __name as upper(rtrim(name));
alter table vehicle_owner add __vin_number as upper(rtrim(vin_number));
