P8-Panels/db/P8PNL_PE_PANEL.sql

23 lines
1.4 KiB
SQL
Raw Permalink 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_PE_PANEL
(
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 - да)
PANEL clob, -- Описание панели
constraint C_P8PNL_PE_PANEL_RN_PK primary key (RN),
constraint C_P8PNL_PE_PANEL_CODE_NB check (rtrim(CODE) is not null),
constraint C_P8PNL_PE_PANEL_NAME_NB check (rtrim(NAME) is not null),
constraint C_P8PNL_PE_PANEL_AUTHOR_FK foreign key (AUTHOR) references USERLIST (AUTHID) on delete cascade,
constraint C_P8PNL_PE_PANEL_READY_VAL check (READY in (0, 1)),
constraint C_P8PNL_PE_PANEL_PBL_VAL check (PBL in (0, 1)),
constraint C_P8PNL_PE_PANEL_UN unique (CODE)
);