/************************************************************************ * Создание таблицы для хранения логов * * * * @file console.tab * * @author Igor Melnikov * * @project ora2pgpro * * @version 1.0.0 * * @history * * IgorM 28.04.2023 - created * ************************************************************************ * Copyright (c) 2023 Postgres Professional * ***********************************************************************/ create table console_log_table ( Id number(9,0) generated always as identity, Level_ number(6,0) default 0 constraint console_log_table_Level_nn not null, constraint console_log_table_level_chk check (level_ in (100, 200, 300, 400, 500, 600, 128000)), Message varchar2(1024 char), Created date default sysdate constraint console_log_table_Created_nn not null, constraint console_log_table_pk primary key (Id) using index (create unique index console_log_table_pk_idx on console_log_table(Id) tablespace users pctfree 0) ) tablespace users; comment on table console_log_table is 'Таблица для хранения текста сообщений из console.log'; comment on column console_log_table.Id is 'Внутренний системный номер строки'; comment on column console_log_table.Level_ is 'Уровень логгинга, к которому относится данное сообщение'; comment on column console_log_table.Created is 'Дата и время создания сообщения'; create index console_log_table_created_idx on console_log_table(trunc(Created)) pctfree 0 tablespace users;