P8-Panels/db/P8PNL_QE_QUERY.sql

26 lines
1.7 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.

/*
Парус 8 - Панели мониторинга - Общие - Редактор запросов
Запросы
*/
create table P8PNL_QE_QUERY
(
RN number(17) not null, -- Рег. номер записи
CODE varchar2(100) not null, -- Мнемокод
NAME varchar2(2000) not null, -- Наименование
AUTHOR varchar2(30) not null, -- Автор
CH_DATE date not null, -- Дата последнего изменения
READY number(1) default 0 not null, -- Флаг готовности к использованию (0 - нет, 1 - да)
PBL number(1) default 0 not null, -- Флаг публичности (0 - нет, 1 - да)
OPTS clob, -- Параметры запроса
ENTS clob, -- Сущности запроса
RLS clob, -- Отношения сущностей запроса
QRY clob, -- Запрос
constraint C_P8PNL_QE_QUERY_RN_PK primary key (RN),
constraint C_P8PNL_QE_QUERY_CODE_NB check (rtrim(CODE) is not null),
constraint C_P8PNL_QE_QUERY_NAME_NB check (rtrim(NAME) is not null),
constraint C_P8PNL_QE_QUERY_AUTHOR_FK foreign key (AUTHOR) references USERLIST (AUTHID) on delete cascade,
constraint C_P8PNL_QE_QUERY_READY_VAL check (READY in (0, 1)),
constraint C_P8PNL_QE_QUERY_PBL_VAL check (PBL in (0, 1)),
constraint C_P8PNL_QE_QUERY_UN unique (CODE)
);