TCF-Framework-Integration/db/UDO_T_EQUIPDSCMMLH.sql

28 lines
1.4 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* Выборки данных оборудования (классы оборудования, модели, история запросов) */
create table UDO_T_EQUIPDSCMMLH
(
/* Регистрационный номер */
RN number(17) not null,
/* Родитель */
PRN number(17) not null,
/* Рег. номер технического объекта */
EQCONFIG number(17) not null,
/* Пользователь, выполнивший запрос */
RQ_AUTHID varchar2(30) not null,
/* Дата/время запроса */
RQ_DATE date not null,
/* Параметры запроса */
RQ blob,
/* Данные прогноза */
FORECAST blob,
/* Идентификатор очереди обмена */
EXSQUEUE number(17) default null,
/* Ключи */
constraint UDO_C_EQUIPDSCMMLH_RN_PK primary key (RN),
constraint UDO_C_EQUIPDSCMMLH_PRN_FK foreign key (PRN) references UDO_T_EQUIPDSCMML(RN),
constraint UDO_C_EQUIPDSCMMLH_EQCONFIG_FK foreign key (EQCONFIG) references EQCONFIG(RN),
constraint UDO_C_EQUIPDSCMMLH_RQAUTHID_NB check (rtrim(RQ_AUTHID) is not null),
constraint UDO_C_EQUIPDSCMMLH_EXSQUEUE_FK foreign key (EXSQUEUE) references EXSQUEUE(RN),
constraint UDO_C_EQUIPDSCMMLH_UN unique (PRN, RQ_AUTHID, RQ_DATE)
);