drop index if exists idx__meta_user_userid;
drop index if exists idx__meta_user_user_domain_name;
drop index if exists idx__meta_user_user_sql_only_user;
create unique index idx__meta_user_userid on meta_user (upper(rtrim(userid)), upper(rtrim(domain_name)));
create index idx__meta_user_user_domain_name on meta_user (upper(rtrim(domain_name)), sql_only_user, upper(rtrim(userid)), recid);
create index idx__meta_user_user_sql_only_user on meta_user (sql_only_user, recid);
drop index if exists idx__customer_pk;
create unique index idx__customer_pk on customer (customernum);
drop index if exists idx__item_pk;
drop index if exists idx__item_name;
create unique index idx__item_pk on item (itemnum);
create index idx__item_name on item (upper(rtrim(itemname)), recid);
drop index if exists idx__order__pk;
drop index if exists idx__order__fk;
create unique index idx__order__pk on order_ (ordernum);
create index idx__order__fk on order_ (customernum, recid);
drop index if exists idx__orderline_pk;
create unique index idx__orderline_pk on orderline (ordernum, itemnum);
