insert into lui_t_application(code,name,description,notes,OWNER,creation_datetime)
VALUES('ORA2PGSYNCX','RUS:XStream и OLR - репликация из Oracle в Postgres;','RUS:;','RUS:;','lui','2025-03-18 09:30:09.407236')
on conflict (code) do update set name=EXCLUDED.name,description=EXCLUDED.description,notes=EXCLUDED.notes,owner=EXCLUDED.owner;

insert into lui_t_language(code,enable,is_def,name,web_icon,app_code,locale)
VALUES('RUS','Y','N','RUS:Русский;DE:Russisch;FR:Russe;ES:Ruso;ENG:Russian;',NULL,'ORA2PGSYNCX','ru_RU')
on conflict (app_code,code) do update set enable=EXCLUDED.enable,is_def=EXCLUDED.is_def,name=EXCLUDED.name,web_icon=EXCLUDED.web_icon;


insert into lui_t_language(code,enable,is_def,name,web_icon,app_code,locale)
VALUES('ENG','Y','Y','RUS:Английский;ENG:English;',NULL,'ORA2PGSYNCX','en_EN')
on conflict (app_code,code) do update set enable=EXCLUDED.enable,is_def=EXCLUDED.is_def,name=EXCLUDED.name,web_icon=EXCLUDED.web_icon;

update lui_t_language set language_code='ENG'
where code='RUS' and app_code='ORA2PGSYNCX';
update lui_t_language set language_code='RUS'
where code='ENG' and app_code='ORA2PGSYNCX';

insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_SETTINGS_RELEASE','RUS:Table for settings releases;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_settings_release',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_MAKE_RELEASE','RUS:Table for settings releases data;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_make_release',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_SETTINGS_RELEASE_SCRIPT','RUS:Table for settings releases script;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_settings_release_script_row',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_SETTINGS_RELEASE_DATA','RUS:Table for settings releases data;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_settings_release_data',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','OLR_METRICS','RUS:Table for olr_metrics;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.olr_metrics',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','OLR_SETTINGS','RUS:Table for olr_settings;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.olr_settings',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','MAINTAIN_SCHEMA','RUS:Schema stored maintain tables;',NULL,'LOVD:ora2pgsyncx2:ora2pg2;ora2pgsyncxolr:ora2pgOLR;ora2pgsyncx:ora2pg;','ora2pgsyncxolr','public','CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do nothing;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','FORMS_CACHE_SIZE','ENG:Максимальное количество форм в кэше (0=кэш отсутствует);',NULL,NULL,NULL,'50','CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','FORMS_CACHE_GROUPS','ENG:Группы форм для кэшмрования. (если пусто, то любые формы);',NULL,NULL,NULL,'LUI_COMMON,ORA2PGSYNCX,PGTARGET_MONITORING','CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','FORMS_CACHE_LIFETIME','ENG:Время жизни кэша форм в секундах (0-кэш отсутствует);',NULL,NULL,'0','0','NUMBER',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_PROC_PAR','RUS:Table for process parameters;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_proc_par',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PGSYNCX_HOME','RUS:Ora2PgSyncX home directory;',NULL,NULL,E'D:\\Ora2PgSyncX',E'D:\\Ora2PgSyncX','CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','MAIN_MENU_AUTOEXPAND','RUS:Автоматическое открытие пунктов главного меню;ENG:Expand main menu items automatically;',NULL,NULL,'N','N','CHAR',NULL,'C','N','N')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','INITIAL_FORM','RUS:Начальная (стартовая) форма;ENG:Initial form;',NULL,NULL,NULL,'ORA2PGSYNCX_B_LOGON','CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','MAIN_MENU_AUTORUNITEM','RUS:Автоматический вызов форм из пунктов главного меню;ENG:Automatic call of forms from the main menu items;',NULL,NULL,'N','N','CHAR',NULL,'C','N','N')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','DEBUG_MODE','RUS:Режим отладки;ENG:Debug Mode;',NULL,NULL,'N','N','CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','APPEARANCE','RUS:Визуальное представление приложения;ENG:Appearance;',NULL,NULL,'Windows',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','FORM2RUN_SYNC_TASK','RUS:Форма для запуска синхронных задач;ENG:Form to start synchronous tasks;',NULL,NULL,'LUI.LUI_B_TASK_RUN_SYNC',NULL,'CHAR',NULL,'Y','N','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','STYLE_BEFORE_LOGON','RUS:Стиль перед входом в приложение;ENG:Style before logon;',NULL,NULL,'default','default','CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','STYLE_AFTER_LOGON','RUS:Стиль после входа в приложение;ENG:Style after logon;',NULL,NULL,'default','default','CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ABOUT_RUS','RUS:Подробное описание приложения на русском языке;ENG:Wide description on Russian;',NULL,NULL,NULL,'

','CHAR',NULL,'Y','Y','N')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_TAB','RUS:Table for tables;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_tab',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_SEQ','RUS:Table for sequences;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_seq',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_COL','RUS:Table for columns;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_col',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_DEBUGLOG','RUS:Table for debug tracking;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_debuglog',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_PGDMLSTATS','RUS:Table for Postgrs DML statistics;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_pgdmlstats',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_PRETTY','RUS:Function for format statistic;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_pretty',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_SCRIPT_ROWS','RUS:Table for script rows;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_script_rows',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_SCRIPTS','RUS:Table for scripts;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_scripts',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_ERRLOG','RUS:Table for error logging;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_errlog',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_EVALEX_ITEMS','RUS:Reference table about EvalEx;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_evalex_items',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_EVALEX_ITEMS_U','RUS:User constants for EvalEx;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_evalex_items_u',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_ERRHNDL','RUS:Table for error handle rules;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_errhndl',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','FVCS_MODE','RUS:Режим управления версиями форм;ENG:Form version control mode;',NULL,NULL,'S','M','CHAR',NULL,'C','N','N')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_PROC','RUS:Table for process;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_proc',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_SLOTS','RUS:Table for slots;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_slots',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;
insert into lui_t_application_property(app_code,code,name,notes,lov,def_value,value,lui_datatype,lui_dataformat,changing,optional,in_memory)
VALUES('ORA2PGSYNCX','ORA2PG_STATS','RUS:Table for statistics;',NULL,NULL,'{ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_stats',NULL,'CHAR',NULL,'Y','Y','Y')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,lov=EXCLUDED.lov,def_value=EXCLUDED.def_value,value=EXCLUDED.value,lui_datatype=EXCLUDED.lui_datatype,lui_dataformat=EXCLUDED.lui_dataformat,changing=EXCLUDED.changing,optional=EXCLUDED.optional,in_memory=EXCLUDED.in_memory;

insert into lui_t_dtdbc(app_code,code,name,mode,username,password,url,schema,sql,notes)
VALUES('ORA2PGSYNCX','ORA2PGSYNCX','Maintain Postgres','COMMON','ora2pgsyncx','ImrFLRfZ90+Uc12NNenIfw==','jdbc:postgresql://luipg1:5432/postgres','lui',NULL,NULL) on conflict do nothing;

insert into lui_t_action_type_right(app_code,code,name,notes)
VALUES('ORA2PGSYNCX','ADD','RUS:Добавление;ENG:;','RUS:Право на добавление новых данных или новых объектов;ENG:The right to add new data or new objects;')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes;
insert into lui_t_action_type_right(app_code,code,name,notes)
VALUES('ORA2PGSYNCX','ADM','RUS:Администрирование;ENG:Administration;','RUS:Право выдавать/отбирать права на объект;ENG:The right to grant/revoke rights on the object;')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes;
insert into lui_t_action_type_right(app_code,code,name,notes)
VALUES('ORA2PGSYNCX','DEL','RUS:Удаление;ENG:Deleting;','RUS:Право на удаление данных;ENG:The right to delete data;')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes;
insert into lui_t_action_type_right(app_code,code,name,notes)
VALUES('ORA2PGSYNCX','LIST','RUS:Просмотр списка;ENG:View list;','RUS:Право на просмотр списка объектов;ENG:The right to view the list of objects;')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes;
insert into lui_t_action_type_right(app_code,code,name,notes)
VALUES('ORA2PGSYNCX','READ','RUS:Просмотр;ENG:View;','RUS:Право на просмотр данных или свойств объектов;ENG:Right to view data or object properties;')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes;
insert into lui_t_action_type_right(app_code,code,name,notes)
VALUES('ORA2PGSYNCX','RUN','RUS:Выполнение;ENG:Execution;','RUS:Право на выполнение некоторого действия;ENG:The right to perform some action;')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes;
insert into lui_t_action_type_right(app_code,code,name,notes)
VALUES('ORA2PGSYNCX','UPD','RUS:Изменение;ENG:Modification;','RUS:Право на изменение данных или свойств существующих объектов;ENG:The right to modify data or properties of existing objects;')
on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes;

insert into lui_t_object_type_right(app_code,code,name,notes,set_select,set_code,set_name,set_parent,set_from,select4lov)
VALUES('ORA2PGSYNCX','FILES','RUS:Тип ассоциированных файлов;ENG:Type of attached files;','RUS:;',NULL,NULL,NULL,NULL,NULL,'select code "{NLS:RUS:Код;ENG:Code;}", 
nls(name)  "{NLS:RUS:Название;ENG:Name;}" 
from lui_t_filetype where app_code=''{Property:AppCode}'' 
order by 1')on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,set_select=EXCLUDED.set_select,set_code=EXCLUDED.set_code,set_name=EXCLUDED.set_name,set_parent=EXCLUDED.set_parent,select4lov=EXCLUDED.select4lov;
insert into lui_t_object_type_right(app_code,code,name,notes,set_select,set_code,set_name,set_parent,set_from,select4lov)
VALUES('ORA2PGSYNCX','UI_ELEMENT','RUS:Элемент форм;ENG:Form element;','RUS:Объекты прав на элементы надо вводить в формате [Список|Бланк].[Столбец|Поле|Действие];ENG:Objects of access to interface elements (must be entered in [List|Form] format).[Column|Field|Action]);',NULL,NULL,NULL,NULL,NULL,'select e.form_code||''.''||e.code "{NLS:RUS:Код формы.Код элемента;ENG:Form code.Element code;}" ,''[ico:''||coalesce((select min(value) from lui_t_value val where val.property_code=''ICON''  and val.config_code=''DEFAULT'' and val.app_code=e.app_code and val.form_code=e.form_code and val.element_code=e.code),'''')
||'']''||nls(e.name) "{NLS:RUS:Название элемента;ENG:Element name;}", etype  "{NLS:RUS:Тип элемента;ENG:Element type;}" ,
f.formtype_code "{NLS:RUS:Тип формы;ENG:Form type;}",
case e.app_code when ''{Property:AppCode}'' then ''1'' else ''2'' end codesort
from lui_t_element e,lui_t_form f where f.code not like ''%__TEMPLATE'' and (e.app_code =''{Property:AppCode}'' OR
e.form_code IN (select  va.value from lui_t_value va, lui_t_value vat ,lui_t_element el, lui_t_form frm 
where va.app_code=''{Property:AppCode}''  and va.form_code=frm.code
and frm.app_code=va.app_code and frm.version_number is null
and va.app_code=vat.app_code and va.element_code=vat.element_code
and va.config_code=vat.config_code and va.form_code=vat.form_code
and vat.property_code=''COMMAND_TYPE'' and vat.value in (''MENU'',''LIST'',''BLANK'',''TREE'')
and el.app_code=va.app_code and el.etype=''ACTION'' 
and el.form_code=frm.code
and el.code=va.element_code 
and frm.formtype_code=''MENU''
and va.property_code=''COMMAND''
))
and e.etype!=''PARAM'' 
and f.code=e.form_code 
and f.app_code=e.app_code 
and f.version_number is null 
order by 5,4 desc,1')on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,set_select=EXCLUDED.set_select,set_code=EXCLUDED.set_code,set_name=EXCLUDED.set_name,set_parent=EXCLUDED.set_parent,select4lov=EXCLUDED.select4lov;
insert into lui_t_object_type_right(app_code,code,name,notes,set_select,set_code,set_name,set_parent,set_from,select4lov)
VALUES('ORA2PGSYNCX','USER','RUS:Пользователь приложения;ENG:Application user;','RUS:;ENG:;',NULL,NULL,NULL,NULL,NULL,'select user_name "{NLS:RUS:Имя пользователя;ENG:Username;}",
       notes "{NLS:RUS:Примечания;ENG:Notes;}" 
from lui_t_user where app_code=''{Property:AppCode}'' order by 1')on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,set_select=EXCLUDED.set_select,set_code=EXCLUDED.set_code,set_name=EXCLUDED.set_name,set_parent=EXCLUDED.set_parent,select4lov=EXCLUDED.select4lov;
insert into lui_t_object_type_right(app_code,code,name,notes,set_select,set_code,set_name,set_parent,set_from,select4lov)
VALUES('ORA2PGSYNCX','USERGROUP','RUS:Группа пользователей;ENG:User group;','RUS:;',NULL,NULL,NULL,NULL,NULL,'select code,nls(name) from lui_t_usergroup where app_code=''{Property:AppCode}''  order by 1')on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,set_select=EXCLUDED.set_select,set_code=EXCLUDED.set_code,set_name=EXCLUDED.set_name,set_parent=EXCLUDED.set_parent,select4lov=EXCLUDED.select4lov;

insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','LIST','FILES','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','DEL','FILES','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','ADM','FILES','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','UPD','FILES','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','READ','FILES','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','ADD','FILES','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','UPD','UI_ELEMENT','Y')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','READ','UI_ELEMENT','Y')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','RUN','UI_ELEMENT','Y')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','DEL','USER','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','UPD','USER','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','ADM','USER','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','ADD','USER','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','ADM','USERGROUP','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','DEL','USERGROUP','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','ADD','USERGROUP','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;
insert into lui_t_action_type4object_type(app_code,action_type,object_type,def_status)
VALUES('ORA2PGSYNCX','UPD','USERGROUP','N')on conflict (app_code,action_type,object_type) do update set def_status=EXCLUDED.def_status;

insert into lui_t_usergroup(app_code,code,name,notes,prg_when_grant,prg_when_revoke,ldap,is_system)
VALUES('ORA2PGSYNCX','ADM','RUS:Администратор;ENG:Administrator;','RUS:Пользователи данной группы могут управлять правами доступа, пользователями и группами пользователей;ENG:Members of this group can manage access rights, users, and user groups;',NULL,NULL,NULL,'N')on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,prg_when_grant=EXCLUDED.prg_when_grant,prg_when_revoke=EXCLUDED.prg_when_revoke,ldap=EXCLUDED.ldap,is_system=EXCLUDED.is_system;
insert into lui_t_usergroup(app_code,code,name,notes,prg_when_grant,prg_when_revoke,ldap,is_system)
VALUES('ORA2PGSYNCX','COMMON','RUS:Общая группа для всех пользователей;ENG:Common group for all users;','RUS:Для этой группы запрещены все пункты главного меню. Это обеспечивает более удобную выдачу прав другим группам.В эту группу включается каждый пользователь при его создании.;ENG:All items of the main menu are prohibited for this group. This makes it easier to grant rights to other groups. When you create any user, it is automatically included in this group;',NULL,NULL,NULL,'N')on conflict (app_code,code) do update set name=EXCLUDED.name,notes=EXCLUDED.notes,prg_when_grant=EXCLUDED.prg_when_grant,prg_when_revoke=EXCLUDED.prg_when_revoke,ldap=EXCLUDED.ldap,is_system=EXCLUDED.is_system;

insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','UPD','FILES','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','ADD','FILES','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','ADM','USERGROUP','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','DEL','USER','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','UPD','USER','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','ADD','USER','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','UPD','USERGROUP','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','ADD','USERGROUP','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','READ','FILES','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','DEL','FILES','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','LIST','FILES','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','UPD','UI_ELEMENT','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','READ','UI_ELEMENT','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','RUN','UI_ELEMENT','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','ADM','UI_ELEMENT','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','ADM','USER','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('%','ORA2PGSYNCX','ADM','DEL','USERGROUP','GRANT','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('ORA2PGSYNCX_M_MAIN_MENU.EXIT','ORA2PGSYNCX','COMMON','RUN','UI_ELEMENT','REVOKE','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('ORA2PGSYNCX_M_MAIN_MENU.SYSMENU$%','ORA2PGSYNCX','COMMON','RUN','UI_ELEMENT','REVOKE','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
insert into lui_t_object_right(object,app_code,usersgroup_code,action_type,object_type,status,enable,notes)
VALUES('ORA2PGSYNCX_M_MAIN_MENU.%','ORA2PGSYNCX','COMMON','RUN','UI_ELEMENT','REVOKE','Y',NULL)on conflict (app_code,object,usersgroup_code,action_type,object_type) do update set status=EXCLUDED.status,enable=EXCLUDED.enable,notes=EXCLUDED.notes;
set standard_conforming_strings = on;
Delete from lui_t_value where form_code='COLUMNS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='COLUMNS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='COLUMNS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='COLUMNS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'COLUMNS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'DEL', 'ACTION', 'COLUMNS', 'RUS:Удалить;ENG:Delete;', null, 1),
('ORA2PGSYNCX', 'REFRESHED', 'ITEM', 'COLUMNS', 'RUS:Статус обновления:I-новый,U-обновлён;', null, 38),
('ORA2PGSYNCX', 'REFRESHED_NOTES', 'ITEM', 'COLUMNS', 'RUS:refreshed_notes;', null, 39),
('ORA2PGSYNCX', 'ID', 'ITEM', 'COLUMNS', 'id', null, 36),
('ORA2PGSYNCX', 'EXPRESSION', 'ITEM', 'COLUMNS', 'expression', null, 34),
('ORA2PGSYNCX', 'EXCLUDE', 'ITEM', 'COLUMNS', 'exclude', null, 33),
('ORA2PGSYNCX', 'WARNING', 'ITEM', 'COLUMNS', 'warning', null, 30),
('ORA2PGSYNCX', 'PROBLEM', 'ITEM', 'COLUMNS', 'problem', null, 29),
('ORA2PGSYNCX', 'P_ORA_TABLE', 'PARAM', 'COLUMNS', 'ora_table', null, 7),
('ORA2PGSYNCX', 'P_ORA_SCHEMA', 'PARAM', 'COLUMNS', 'ora_schema', null, 6),
('ORA2PGSYNCX', 'POSTGRES', 'GROUP', 'COLUMNS', 'Postgres', null, 5),
('ORA2PGSYNCX', 'ORACLE', 'GROUP', 'COLUMNS', 'Oracle', null, 4),
('ORA2PGSYNCX', 'FIX', 'GROUP', 'COLUMNS', 'Fix', null, 2),
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'COLUMNS', 'Примечания', null, 35),
('ORA2PGSYNCX', 'ORACOLUMN_ID', 'ITEM', 'COLUMNS', 'oracolumn_id', null, 37),
('ORA2PGSYNCX', 'EXCLUDE_EXCLUDE_EDIT', 'ACTION', 'COLUMNS', 'Изменить', 'EXCLUDE', 1),
('ORA2PGSYNCX', 'EXCLUDE_EXC', 'ACTION', 'COLUMNS', 'exclude', 'EXCLUDE', 2),
('ORA2PGSYNCX', 'EXCLUDE_INC', 'ACTION', 'COLUMNS', 'include', 'EXCLUDE', 3),
('ORA2PGSYNCX', 'WARNING_EDIT', 'ACTION', 'COLUMNS', 'Change', 'WARNING', 1),
('ORA2PGSYNCX', 'PROBLEM_CLEAR', 'ACTION', 'COLUMNS', 'RUS:Clear;ENG:Clear;', 'PROBLEM', 2),
('ORA2PGSYNCX', 'PROBLEM_EDIT', 'ACTION', 'COLUMNS', 'Change', 'PROBLEM', 1),
('ORA2PGSYNCX', 'PG_SCHEMA', 'ITEM', 'COLUMNS', 'pg_schema', 'POSTGRES', 15),
('ORA2PGSYNCX', 'PG_TABLE', 'ITEM', 'COLUMNS', 'pg_table', 'POSTGRES', 16),
('ORA2PGSYNCX', 'PG_COLUMN', 'ITEM', 'COLUMNS', 'pg_column', 'POSTGRES', 17),
('ORA2PGSYNCX', 'PG_COLUMN_NAME', 'ITEM', 'COLUMNS', 'pg_column_name', 'POSTGRES', 18),
('ORA2PGSYNCX', 'PG_TYPE', 'ITEM', 'COLUMNS', 'pg_type', 'POSTGRES', 19),
('ORA2PGSYNCX', 'PG_NULLABLE', 'ITEM', 'COLUMNS', 'pg_nullable', 'POSTGRES', 24),
('ORA2PGSYNCX', 'PG_SCALE', 'ITEM', 'COLUMNS', 'pg_scale', 'POSTGRES', 23),
('ORA2PGSYNCX', 'PG_TC', 'ITEM', 'COLUMNS', 'pg_tc', 'POSTGRES', 20),
('ORA2PGSYNCX', 'PG_PREC', 'ITEM', 'COLUMNS', 'pg_prec', 'POSTGRES', 22),
('ORA2PGSYNCX', 'PG_LEN', 'ITEM', 'COLUMNS', 'pg_len', 'POSTGRES', 21),
('ORA2PGSYNCX', 'PG_PK', 'ITEM', 'COLUMNS', 'pg_pk', 'POSTGRES', 25),
('ORA2PGSYNCX', 'PG_FUNC', 'ITEM', 'COLUMNS', 'pg_func', 'POSTGRES', 28),
('ORA2PGSYNCX', 'PG_UK', 'ITEM', 'COLUMNS', 'pg_uk', 'POSTGRES', 26),
('ORA2PGSYNCX', 'PG_UKH', 'ITEM', 'COLUMNS', 'pg_ukh', 'POSTGRES', 27),
('ORA2PGSYNCX', 'ORA_SCHEMA', 'ITEM', 'COLUMNS', 'ora_schema', 'ORACLE', 4),
('ORA2PGSYNCX', 'ORA_TABLE', 'ITEM', 'COLUMNS', 'ora_table', 'ORACLE', 5),
('ORA2PGSYNCX', 'ORA_COLUMN', 'ITEM', 'COLUMNS', 'ora_column', 'ORACLE', 6),
('ORA2PGSYNCX', 'ORA_TYPE', 'ITEM', 'COLUMNS', 'ora_type', 'ORACLE', 7),
('ORA2PGSYNCX', 'ORA_TC', 'ITEM', 'COLUMNS', 'ora_tc', 'ORACLE', 8),
('ORA2PGSYNCX', 'ORA_LEN', 'ITEM', 'COLUMNS', 'ora_len', 'ORACLE', 9),
('ORA2PGSYNCX', 'ORA_PREC', 'ITEM', 'COLUMNS', 'ora_prec', 'ORACLE', 10),
('ORA2PGSYNCX', 'ORA_SCALE', 'ITEM', 'COLUMNS', 'ora_scale', 'ORACLE', 11),
('ORA2PGSYNCX', 'ORA_NULLABLE', 'ITEM', 'COLUMNS', 'ora_nullable', 'ORACLE', 12),
('ORA2PGSYNCX', 'ORA_PK', 'ITEM', 'COLUMNS', 'ora_pk', 'ORACLE', 13),
('ORA2PGSYNCX', 'ORA_UK', 'ITEM', 'COLUMNS', 'ora_uk', 'ORACLE', 14),
('ORA2PGSYNCX', 'IDENT', 'ITEM', 'COLUMNS', 'ident', 'FIX', 2),
('ORA2PGSYNCX', 'IDENT_U', 'ITEM', 'COLUMNS', 'ident_u', 'FIX', 3),
('ORA2PGSYNCX', 'SPLIT_U', 'ITEM', 'COLUMNS', 'split', 'FIX', 5),
('ORA2PGSYNCX', 'SPLIT', 'ITEM', 'COLUMNS', 'split', 'FIX', 4),
('ORA2PGSYNCX', 'NOTES_NOTES_CHANGE', 'ACTION', 'COLUMNS', 'Change', 'NOTES', 1),
('ORA2PGSYNCX', 'NOTES_NOTES_SETSAME', 'ACTION', 'COLUMNS', 'Set for all selected', 'NOTES', 2),
('ORA2PGSYNCX', 'PG_FUNC_EDIT', 'ACTION', 'COLUMNS', 'Изменить', 'PG_FUNC', 1),
('ORA2PGSYNCX', 'IDENT_U_Y', 'ACTION', 'COLUMNS', 'Set Y', 'IDENT_U', 2),
('ORA2PGSYNCX', 'IDENT_U_CLEAR', 'ACTION', 'COLUMNS', 'Clear', 'IDENT_U', 3),
('ORA2PGSYNCX', 'SPLIT_U_Y', 'ACTION', 'COLUMNS', 'Set Y', 'SPLIT_U', 1),
('ORA2PGSYNCX', 'SPLIT_U_CLEAR', 'ACTION', 'COLUMNS', 'Clear', 'SPLIT_U', 2);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'Columns', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'ICON', null, 'delrow', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)delete from {ApplicationProperty:ORA2PG_COL} where id={F2SQL:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'PROMPT', 'Y', 'ENG:Delete;RUS:Delete column definition;', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'QUESTION', null, replace($A603913316${JS:if ("{FormProperty:SelectionMode}" == "Single") "Definition for column {F:ORA_SCHEMA}.{F:ORA_TABLE}.{F:ORA_COLUMN} will be deleted."
else "Definitions for {FormProperty:CountSelected} columns will be deleted."}$A603913316$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'DEL', 'ROLE', null, 'DELETE', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE', 'CAPTION', 'N', 'exclude', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE', 'CAPTION_VISUAL', null, replace($A395257605${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_COL} where exclude is not null 
{JS:"{F:P_ORA_SCHEMA}"?"and ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}":""}
limit 1 /*{FormProperty:SPLIT_U_N}*/}$A395257605$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE', 'DEFINITION', null, 'c.exclude', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE', 'HINT', 'N', 'exclude', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE', 'VISUALIZATION', null, '{JS:"{Property:Value}"?"BACKGROUND(yellow)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXC', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXC', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXC', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXC', 'ICON', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXC', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXC', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXC', 'PROC_INITIALLY', null, replace($A315668356$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set exclude='Y' where id={F:ID}$A315668356$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXC', 'PROMPT', null, '[ico:cancel]exclude', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXCLUDE_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXCLUDE_EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXCLUDE_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXCLUDE_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXCLUDE_EDIT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set exclude={F2SQL:EXCLUDE} where id={F:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXCLUDE_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_EXCLUDE_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_INC', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_INC', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_INC', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_INC', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_INC', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_INC', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set exclude=null where id={F:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXCLUDE_INC', 'PROMPT', null, '[ico:addrow]include', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXPRESSION', 'CAPTION', 'N', 'expression', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXPRESSION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXPRESSION', 'DEFINITION', null, 'c.expression', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXPRESSION', 'HINT', 'N', 'expression', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXPRESSION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'EXPRESSION', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'FIX', 'GROUP_TYPE', null, 'FIXED', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ID', 'CAPTION', 'N', 'id', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ID', 'DEFINITION', null, 'c.id', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ID', 'HINT', 'N', 'id', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ID', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT', 'CAPTION', 'N', 'ident', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT', 'DEFINITION', null, 'c.ident', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT', 'HINT', 'N', 'ident', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U', 'CAPTION', 'N', 'ident_u', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U', 'CAPTION_VISUAL', null, replace($A276744034${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_COL} where ident_u is not null 
{JS:"{F:P_ORA_SCHEMA}"?"and ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}":""}
limit 1 /*{FormProperty:SPLIT_U_N}*/}$A276744034$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U', 'DEFINITION', null, 'c.ident_u', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U', 'HINT', 'N', 'ident_u', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U', 'VISUALIZATION', null, '{JS:"{Property:Value}"?"BACKGROUND(yellow)":"{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}"}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_CLEAR', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_CLEAR', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_CLEAR', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_CLEAR', 'EXPLANATION', null, 'Clear', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_CLEAR', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_CLEAR', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_CLEAR', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_COL} set ident_u=null where id={F:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_CLEAR', 'PROMPT', null, '[ico:clean]Clear', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_Y', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_Y', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_Y', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_Y', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_Y', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_Y', 'PROC_INITIALLY', null, replace($A527099120$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_COL} set ident_u='Y' where id={F:ID}$A527099120$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'IDENT_U_Y', 'PROMPT', null, '[ico:Ya]Set Y', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES', 'CAPTION', null, 'Notes', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES', 'CAPTION_VISUAL', null, replace($A620581027${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_COL} where notes is not null 
{JS:"{F:P_ORA_SCHEMA}"?"and ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}":""}
limit 1 /*{FormProperty:SPLIT_U_N}*/}$A620581027$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES', 'DEFINITION', null, 'c.notes', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_CHANGE', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_CHANGE', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_CHANGE', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_CHANGE', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_CHANGE', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_CHANGE', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set notes={F2SQL:NOTES} where id={F2SQL:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_CHANGE', 'PROMPT', 'N', 'Change', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_CHANGE', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_SETSAME', 'ACTIVE', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"N";else "EXIST";}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_SETSAME', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_SETSAME', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_SETSAME', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_SETSAME', 'PROC_FINALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set notes={FormProperty:Notes4All} where id={F2SQL:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_SETSAME', 'PROC_INITIALLY', null, replace($A628979042$FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}
$A628979042$||$A628979042$
FormProperty:Notes4All={F2SQL:NOTES}$A628979042$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'NOTES_NOTES_SETSAME', 'PROMPT', null, 'Set same for all selected', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACLE', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACLE', 'TITLE', null, 'Oracle', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_COLUMN', 'CAPTION', null, 'column', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_COLUMN', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_COLUMN', 'DEFINITION', null, 'c.ora_column', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_COLUMN', 'HINT', 'N', 'ora_column', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_COLUMN', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_COLUMN', 'SORT', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_COLUMN', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACOLUMN_ID', 'CAPTION', 'N', 'oracolumn_id', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACOLUMN_ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACOLUMN_ID', 'DEFINITION', null, 'c.oracolumn_id', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACOLUMN_ID', 'HINT', 'N', 'oracolumn_id', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACOLUMN_ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACOLUMN_ID', 'SORT', null, '3', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORACOLUMN_ID', 'VISIBLE', null, 'Y', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_LEN', 'CAPTION', null, 'len', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_LEN', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_LEN', 'DEFINITION', null, 'c.ora_len', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_LEN', 'HINT', 'N', 'ora_len', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_LEN', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_LEN', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_NULLABLE', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_NULLABLE', 'CAPTION', null, 'nullable', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_NULLABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_NULLABLE', 'DEFINITION', null, 'c.ora_nullable', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_NULLABLE', 'HINT', 'N', 'ora_nullable', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_NULLABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_NULLABLE', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PK', 'CAPTION', null, 'pk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PK', 'DEFINITION', null, 'c.ora_pk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PK', 'HINT', 'N', 'ora_pk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PK', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PREC', 'CAPTION', null, 'prec', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PREC', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PREC', 'DEFINITION', null, 'c.ora_prec', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PREC', 'HINT', 'N', 'ora_prec', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PREC', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_PREC', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCALE', 'CAPTION', null, 'scale', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCALE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCALE', 'DEFINITION', null, 'c.ora_scale', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCALE', 'HINT', 'N', 'ora_scale', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCALE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCALE', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCHEMA', 'CAPTION', null, 'schema', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCHEMA', 'DEFINITION', null, 'c.ora_schema', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCHEMA', 'HINT', 'N', 'ora_schema', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCHEMA', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_SCHEMA', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TABLE', 'CAPTION', null, 'table', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TABLE', 'DEFINITION', null, 'c.ora_table', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TABLE', 'HINT', 'N', 'ora_table', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TABLE', 'SORT', null, '2', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TABLE', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TC', 'CAPTION', null, 'tc', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TC', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TC', 'DEFINITION', null, 'c.ora_tc', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TC', 'HINT', 'N', 'ora_tc', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TC', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TC', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TYPE', 'CAPTION', null, 'type', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TYPE', 'DEFINITION', null, 'c.ora_type', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TYPE', 'HINT', 'N', 'ora_type', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_TYPE', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_UK', 'CAPTION', null, 'uk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_UK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_UK', 'DEFINITION', null, 'c.ora_uk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_UK', 'HINT', 'N', 'ora_uk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_UK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'ORA_UK', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN', 'CAPTION', null, 'column', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN', 'DEFINITION', null, 'c.pg_column', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN', 'HINT', 'N', 'pg_column', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN_NAME', 'CAPTION', 'N', 'pg_column_name', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN_NAME', 'DEFINITION', null, 'c.pg_column_name', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN_NAME', 'HINT', 'N', 'pg_column_name', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_COLUMN_NAME', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC', 'CAPTION', 'N', 'pg_func', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC', 'DEFINITION', null, 'c.pg_func', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC', 'HINT', 'N', 'pg_func', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC_EDIT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set pg_func={F2SQL:PG_FUNC} where id={F:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_FUNC_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_LEN', 'CAPTION', null, 'len', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_LEN', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_LEN', 'DEFINITION', null, 'c.pg_len', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_LEN', 'HINT', 'N', 'pg_len', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_LEN', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_LEN', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_NULLABLE', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_NULLABLE', 'CAPTION', null, 'nullable', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_NULLABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_NULLABLE', 'DEFINITION', null, 'c.pg_nullable', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_NULLABLE', 'HINT', 'N', 'pg_nullable', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_NULLABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_NULLABLE', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PK', 'CAPTION', null, 'pk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PK', 'DEFINITION', null, 'c.pg_pk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PK', 'HINT', 'N', 'pg_pk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PK', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PREC', 'CAPTION', null, 'prec', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PREC', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PREC', 'DEFINITION', null, 'c.pg_prec', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PREC', 'HINT', 'N', 'pg_prec', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PREC', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_PREC', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCALE', 'CAPTION', null, 'scale', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCALE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCALE', 'DEFINITION', null, 'c.pg_scale', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCALE', 'HINT', 'N', 'pg_scale', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCALE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCALE', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCHEMA', 'CAPTION', null, 'schema', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCHEMA', 'DEFINITION', null, 'c.pg_schema', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCHEMA', 'HINT', 'N', 'pg_schema', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_SCHEMA', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TABLE', 'CAPTION', null, 'table', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TABLE', 'DEFINITION', null, 'c.pg_table', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TABLE', 'HINT', 'N', 'pg_table', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TABLE', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TC', 'CAPTION', null, 'tc', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TC', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TC', 'DEFINITION', null, 'c.pg_tc', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TC', 'HINT', 'N', 'pg_tc', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TC', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TC', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TYPE', 'CAPTION', null, 'type', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TYPE', 'DEFINITION', null, 'c.pg_type', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TYPE', 'HINT', 'N', 'pg_type', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_TYPE', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UK', 'CAPTION', null, 'uk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UK', 'DEFINITION', null, 'c.pg_uk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UK', 'HINT', 'N', 'pg_uk', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UK', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UKH', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UKH', 'CAPTION', null, 'ukh', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UKH', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UKH', 'DEFINITION', null, 'c.pg_ukh', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UKH', 'HINT', null, 'ukh', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UKH', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PG_UKH', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'POSTGRES', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'POSTGRES', 'TITLE', null, 'Postgres', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM', 'CAPTION', 'N', 'problem', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM', 'CAPTION_VISUAL', null, replace($A191558796${SQL:(ORA2PGSYNCX)select 'TEXTCOLOR(red)' from {ApplicationProperty:ORA2PG_COL} where problem is not null 
{JS:"{F:P_ORA_SCHEMA}"?"and ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}":""}
limit 1 /*{FormProperty:SPLIT_U_N}*/}$A191558796$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM', 'DEFINITION', null, 'c.problem', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM', 'HINT', 'N', 'problem', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM', 'TOTAL', null, 'count("PROBLEM")', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM', 'VISUALIZATION', null, 'TEXTCOLOR(red)', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_CLEAR', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_CLEAR', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_CLEAR', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_CLEAR', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_CLEAR', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_CLEAR', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set problem=null where id={F:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_CLEAR', 'PROMPT', null, '[ico:clean]Clear', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_EDIT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set problem={F2SQL:PROBLEM} where ID={F:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'PROBLEM_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED', 'CAPTION', null, 'refreshed', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED', 'DEFINITION', null, 'c.refreshed', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED_NOTES', 'CAPTION', null, 'refreshed_notes', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED_NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED_NOTES', 'DEFINITION', null, 'c.refreshed_notes', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED_NOTES', 'HINT', null, 'refreshed_notes', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'REFRESHED_NOTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT', 'CAPTION', 'N', 'split', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT', 'DEFINITION', null, replace($A675215146$case when t.split||',' like c.ora_column||',%' then 'Y' else null end$A675215146$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT', 'VISUALIZATION', null, '{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U', 'CAPTION', null, 'split_u', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U', 'CAPTION_VISUAL', null, replace($A410833286${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_TAB} where split_u is not null 
{JS:"{F:P_ORA_SCHEMA}"?"and ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}":""}
limit 1 /*{FormProperty:SPLIT_U_N}*/}$A410833286$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U', 'DEFINITION', null, replace($A102551175$case when t.split_u||',' like c.ora_column||',%' then 'Y' else null end$A102551175$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U', 'VISUALIZATION', null, '{JS:"{Property:Value}"?"BACKGROUND(yellow)":"{JS:"{F:ORACOLUMN_ID}"=="1"?"BACKGROUND(lightgray)":""}"}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_CLEAR', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_CLEAR', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_CLEAR', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_CLEAR', 'EXPLANATION', null, 'Clear', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_CLEAR', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_CLEAR', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_CLEAR', 'PROC_INITIALLY', null, replace($A122403286$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_TAB} set split_u=
nullif(trim(both ',' from replace(split_u,{F2SQL:ORA_COLUMN},'')),'') 
where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}$A122403286$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_CLEAR', 'PROMPT', null, '[ico:clean]Clear', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_Y', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_Y', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_Y', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_Y', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_Y', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_Y', 'PROC_INITIALLY', null, replace($A519618580$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_TAB} set split_u=concat_ws(',',split_u,{F2SQL:ORA_COLUMN}) where coalesce(split_u,'')||',' not like {F2SQL:ORA_COLUMN}||',%'
and ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}
$A519618580$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'SPLIT_U_Y', 'PROMPT', null, '[ico:Ya]Set Y', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING', 'CAPTION', 'N', 'warning', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING', 'CAPTION_VISUAL', null, replace($A809443515${SQL:(ORA2PGSYNCX)select 'TEXTCOLOR(brown)' from {ApplicationProperty:ORA2PG_COL} where warning is not null 
{JS:"{F:P_ORA_SCHEMA}"?"and ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}":""}
limit 1 /*{FormProperty:SPLIT_U_N}*/}$A809443515$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING', 'DEFINITION', null, 'c.warning', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING', 'HINT', 'N', 'warning', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING', 'TOTAL', null, 'count("WARNING")', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING', 'VISUALIZATION', null, 'TEXTCOLOR(brown)', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING_EDIT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_COL}  set warning={F2SQL:WARNING} where ID={F:ID}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', 'WARNING_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', null, 'HEADER', null, 'Columns', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', null, 'LINE_FEED', null, 'WRAP', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_COL} c,{ApplicationProperty:ORA2PG_TAB} t where t.ora_schema=c.ora_schema and t.ora_table=c.ora_table', null),
('ORA2PGSYNCX', 'COLUMNS', 'DEFAULT', null, 'START_MODE', null, 'SINGLE_ROW', null);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'RUS:Table columns;', 'DEFAULT', null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'DEL', 'PROC_FINALLY', null, replace($A3345987$FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}
$A3345987$||$A3345987$
FormProperty:safeVarCurrentAction={FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction}
$A3345987$||$A3345987$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction=
$A3345987$||$A3345987$
JS:App.forms.get("{FormProperty:Var ParentFormID}").runAction("REQUERY_ROW")
$A3345987$||$A3345987$
FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N={JS:0{FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N}+1}
$A3345987$||$A3345987$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction={FormProperty:safeVarCurrentAction}$A3345987$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'ORA_SCHEMA', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'ORA_TABLE', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'PG_SCHEMA', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'PG_TABLE', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'PROBLEM_CLEAR', 'PROC_FINALLY', null, replace($A807466425$FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}
$A807466425$||$A807466425$
FormProperty:safeVarCurrentAction={FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction}
$A807466425$||$A807466425$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction=
$A807466425$||$A807466425$
JS:App.forms.get("{FormProperty:Var ParentFormID}").runAction("REQUERY_ROW")
$A807466425$||$A807466425$
FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N={JS:0{FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N}+1}
$A807466425$||$A807466425$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction={FormProperty:safeVarCurrentAction}$A807466425$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'PROBLEM_EDIT', 'PROC_FINALLY', null, replace($A791529587$FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}
$A791529587$||$A791529587$
FormProperty:safeVarCurrentAction={FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction}
$A791529587$||$A791529587$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction=
$A791529587$||$A791529587$
JS:App.forms.get("{FormProperty:Var ParentFormID}").runAction("REQUERY_ROW")
$A791529587$||$A791529587$
FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N={JS:0{FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N}+1}
$A791529587$||$A791529587$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction={FormProperty:safeVarCurrentAction}$A791529587$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'SPLIT_U_CLEAR', 'PROC_FINALLY', null, replace($A753132288$FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}
$A753132288$||$A753132288$
FormProperty:safeVarCurrentAction={FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction}
$A753132288$||$A753132288$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction=
$A753132288$||$A753132288$
JS:App.forms.get("{FormProperty:Var ParentFormID}").runAction("REQUERY_ROW")
$A753132288$||$A753132288$
FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N={JS:0{FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N}+1}
$A753132288$||$A753132288$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction={FormProperty:safeVarCurrentAction}$A753132288$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', 'SPLIT_U_Y', 'PROC_FINALLY', null, replace($A266648433$FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}
$A266648433$||$A266648433$
FormProperty:safeVarCurrentAction={FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction}
$A266648433$||$A266648433$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction=
$A266648433$||$A266648433$
JS:App.forms.get("{FormProperty:Var ParentFormID}").runAction("REQUERY_ROW")
$A266648433$||$A266648433$
FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N={JS:0{FormProperty:{FormProperty:Var ParentFormID}.SPLIT_U_N}+1}
$A266648433$||$A266648433$
FormProperty:{FormProperty:Var ParentFormID}.Var CurrentAction={FormProperty:safeVarCurrentAction}$A266648433$,chr(13),''), null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', null, 'HEADER', null, 'Columns for {F:P_ORA_SCHEMA}.{F:P_ORA_TABLE}', null),
('ORA2PGSYNCX', 'COLUMNS', 'DETAIL', null, 'QUERY_TEXT', null, replace($A576885906$(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_COL} c,{ApplicationProperty:ORA2PG_TAB} t where t.ora_schema=c.ora_schema and t.ora_table=c.ora_table
and c.ora_schema={F2SQL:P_ORA_SCHEMA} and c.ora_table={F2SQL:P_ORA_TABLE}$A576885906$,chr(13),''), null);
Delete from lui_t_value where form_code='DEBUG' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='DEBUG' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='DEBUG' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='DEBUG' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'DEBUG', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'DEBUG', 'ITEM', 'DEBUG', 'Debug', null, 4),
('ORA2PGSYNCX', 'REFRESH', 'ACTION', 'DEBUG', 'Refresh', null, 3),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'DEBUG', 'xout', null, 1),
('ORA2PGSYNCX', 'NEXT', 'ACTION', 'DEBUG', 'Next', null, 2);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'Debug', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'DEBUG', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'DEBUG', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'DEBUG', 'GETUP', null, 'TEXTCOLOR(rgb(47,106,160)) TEXTCOLOR(#888) BOLD TEXTCOLOR(rgb(13,151,255)) TEXTCOLOR(brown)', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'DEBUG', 'MAKEUP', null, replace($A863582597$/(\d{3})::(?:([SN]\d{4}).*|(DUMMY::.*)|(.*))/$A863582597$,chr(13),''), null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'DEBUG', 'VISIBLE', null, '10/10', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'NEXT', 'ACTIVE', null, 'Y', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'NEXT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'NEXT', 'PROC_INITIALLY', null, replace($A778041754$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_DEBUGLOG} 
set response_datetime=current_timestamp where 
response_datetime is null and xout={F2SQL:P_XOUT}$A778041754$,chr(13),''), null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'NEXT', 'PROMPT', 'N', 'Next', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'NEXT', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'NEXT', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'REFRESH', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'REFRESH', 'PROC_INITIALLY', null, replace($A44254110$F:DEBUG={SQL:(ORA2PGSYNCX)select string_agg(to_char(d.log_datetime,'yyyy-mm-dd hh24:mi:ss.ms')||'::'||d.log_message,chr(10)) from
(select * from 
(  select * from {ApplicationProperty:ORA2PG_DEBUGLOG}
  order by id desc limit 60)n order by id)d
  }$A44254110$,chr(13),''), null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'REFRESH', 'PROMPT', 'N', 'Refresh', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', 'REFRESH', 'ROLE', null, 'TIME', null),
('ORA2PGSYNCX', 'DEBUG', 'DEFAULT', null, 'HEADER', null, 'Debug', null);
Delete from lui_t_value where form_code='DISCARD_QUERY' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='DISCARD_QUERY' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='DISCARD_QUERY' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='DISCARD_QUERY' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'DISCARD_QUERY', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'COLS', 'ACTION', 'DISCARD_QUERY', 'RUS:Columns;ENG:Columns;', null, 6),
('ORA2PGSYNCX', 'CONSTANTS', 'ACTION', 'DISCARD_QUERY', 'RUS:Constants;ENG:Constants;', null, 9),
('ORA2PGSYNCX', 'ON_BOT', 'GROUP', 'DISCARD_QUERY', 'RUS:BOTTOM;ENG:BOTTOM;', null, 3),
('ORA2PGSYNCX', 'P_ORA_TABLE', 'PARAM', 'DISCARD_QUERY', 'RUS:ora_table;ENG:ora_table;', null, 5),
('ORA2PGSYNCX', 'P_ORA_SCHEMA', 'PARAM', 'DISCARD_QUERY', 'RUS:ora_schema;ENG:ora_schema;', null, 4),
('ORA2PGSYNCX', 'CONDITION', 'ITEM', 'DISCARD_QUERY', 'RUS:Discard query;ENG:Discard query;', null, 1),
('ORA2PGSYNCX', 'COLS_P_ORA_SCHEMA', 'PARAM', 'DISCARD_QUERY', 'RUS:ora_schema;ENG:ora_schema;', 'COLS', 1),
('ORA2PGSYNCX', 'COLS_P_ORA_TABLE', 'PARAM', 'DISCARD_QUERY', 'RUS:ora_table;ENG:ora_table;', 'COLS', 2),
('ORA2PGSYNCX', 'COLS_P_DB', 'PARAM', 'DISCARD_QUERY', 'RUS:DB;ENG:DB;', 'COLS', 3),
('ORA2PGSYNCX', 'CONSTANTS_P_CATEGORY', 'PARAM', 'DISCARD_QUERY', 'RUS:Category;ENG:Category;', 'CONSTANTS', 1),
('ORA2PGSYNCX', 'CONSTANTS_P_ENGINE', 'PARAM', 'DISCARD_QUERY', 'RUS:Engine;ENG:Engine;', 'CONSTANTS', 2),
('ORA2PGSYNCX', 'CONSTANTS_P_DDOT', 'PARAM', 'DISCARD_QUERY', 'RUS::;ENG::;', 'CONSTANTS', 3),
('ORA2PGSYNCX', 'OK', 'ACTION', 'DISCARD_QUERY', 'RUS:Apply;ENG:Save;', 'ON_BOT', 6),
('ORA2PGSYNCX', 'CANCEL', 'ACTION', 'DISCARD_QUERY', 'ENG:Reject;RUS:Отказаться;', 'ON_BOT', 900),
('ORA2PGSYNCX', 'ON_BOT_FIX', 'GROUP', 'DISCARD_QUERY', 'RUS:Fix;ENG:Fix;', 'ON_BOT', 4),
('ORA2PGSYNCX', 'DISCARD_MODE', 'ITEM', 'DISCARD_QUERY', 'RUS:Mode;ENG:Mode;', 'ON_BOT', 2),
('ORA2PGSYNCX', 'DISCARD_UPD_SRC', 'ITEM', 'DISCARD_QUERY', 'RUS:Binds source if update;ENG:Binds source if update;', 'ON_BOT', 3),
('ORA2PGSYNCX', 'DISCARD_DB', 'ITEM', 'DISCARD_QUERY', 'RUS:DB;ENG:DB;', 'ON_BOT', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'RUS:Discard query;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CANCEL', 'AFTER', null, 'CANCEL', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CANCEL', 'ICON', null, 'cancel', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CANCEL', 'PROMPT', 'Y', 'RUS:Cancel;ENG:Cancel;', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CANCEL', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CANCEL', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS', 'COMMAND', null, 'FORMULA_COLS_PG', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS', 'ROLE', null, 'AUTOTABRIGHT', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS_P_DB', 'NAME', null, 'P_DB', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS_P_DB', 'VALUE', null, '{F:DISCARD_DB}', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS_P_ORA_SCHEMA', 'NAME', null, 'P_ORA_SCHEMA', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS_P_ORA_SCHEMA', 'VALUE', null, '{F:P_ORA_SCHEMA}', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS_P_ORA_TABLE', 'NAME', null, 'P_ORA_TABLE', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'COLS_P_ORA_TABLE', 'VALUE', null, '{F:P_ORA_TABLE}', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONDITION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONDITION', 'DEFINITION', null, '{SQL:(ORA2PGSYNCX)select discard from {ApplicationProperty:ORA2PG_TAB}  where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}}', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONDITION', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONDITION', 'VISIBLE', null, '8/9', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONDITION', 'VISUALIZATION', null, '.pgsql', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS', 'COMMAND', null, 'FORMULA_EVALEX_ITEMS', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS', 'ROLE', null, 'AUTOTABRIGHT', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS_P_CATEGORY', 'NAME', null, 'P_CATEGORY', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS_P_CATEGORY', 'VALUE', null, 'Constant', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS_P_DDOT', 'NAME', null, 'P_DDOT', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS_P_DDOT', 'VALUE', null, ':', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'CONSTANTS_P_ENGINE', 'NAME', null, 'P_ENGINE', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_DB', 'CAPTION', 'Y', 'RUS:DB;ENG:DB;', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_DB', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_DB', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_DB', 'DEFINITION', null, replace($A894946912${SQL:(ORA2PGSYNCX)select coalesce(discard_db,'pg') from {ApplicationProperty:ORA2PG_TAB}  where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}}$A894946912$,chr(13),''), null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_DB', 'VARIANTS', null, 'LOVD:pg:PostgreSQL;ora:Oracle;', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_MODE', 'CAPTION', 'Y', 'ENG:Mode;RUS:Mode;', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_MODE', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_MODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_MODE', 'DEFINITION', null, replace($A662393623${SQL:(ORA2PGSYNCX)select coalesce(discard_mode,'Y') from {ApplicationProperty:ORA2PG_TAB}  where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}}$A662393623$,chr(13),''), null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_MODE', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_MODE', 'VARIANTS', null, 'LOVD:Y:Discard if row exists;N:Discard if row not exists;', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_UPD_SRC', 'CAPTION', 'Y', 'RUS:Binds source if update;ENG:Binds source if update;', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_UPD_SRC', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_UPD_SRC', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_UPD_SRC', 'DEFINITION', null, replace($A686225087${SQL:(ORA2PGSYNCX)select coalesce(discard_upd_src,'O') from {ApplicationProperty:ORA2PG_TAB}  where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}}$A686225087$,chr(13),''), null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_UPD_SRC', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'DISCARD_UPD_SRC', 'VARIANTS', null, 'LOVD:O:Old record;N:New record;', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'OK', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'OK', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'OK', 'PROC_INITIALLY', null, replace($A471505911$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_TAB} set discard={F2SQL:CONDITION} , discard_cmpld=null, discard_binds=null, discard_error=null, discard_mode={F2SQL:DISCARD_MODE},
discard_upd_src={F2SQL:DISCARD_UPD_SRC},discard_db={F2SQL:DISCARD_DB}
where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE} 
and(discard is distinct from {F2SQL:CONDITION} or discard_mode is distinct from {F2SQL:DISCARD_MODE} or discard_upd_src is distinct from {F2SQL:DISCARD_UPD_SRC} 
or discard_db is distinct from {F2SQL:DISCARD_DB})$A471505911$,chr(13),''), null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'OK', 'PROMPT', 'Y', 'RUS:Apply;ENG:Save;', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'OK', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'ON_BOT', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'ON_BOT', 'POSITION', null, 'LEFT', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', 'ON_BOT_FIX', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'DISCARD_QUERY', 'DEFAULT', null, 'HEADER', null, 'Discarding query for {F:P_ORA_SCHEMA}.{F:P_ORA_TABLE}', null);
Delete from lui_t_value where form_code='ERRHNDL' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='ERRHNDL' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='ERRHNDL' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='ERRHNDL' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'ERRHNDL', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'EDIT', 'ACTION', 'ERRHNDL', 'RUS:Edit;ENG:Edit;', null, 1),
('ORA2PGSYNCX', 'PG_CONSTRAINT', 'ITEM', 'ERRHNDL', 'RUS:pg_constraint;', null, 12),
('ORA2PGSYNCX', 'SQLSTATE', 'ITEM', 'ERRHNDL', 'RUS:sqlstate;', null, 11),
('ORA2PGSYNCX', 'SQLCODE', 'ITEM', 'ERRHNDL', 'RUS:sqlcode;', null, 10),
('ORA2PGSYNCX', 'DML_TYPE', 'ITEM', 'ERRHNDL', 'RUS:dml_type;', null, 9),
('ORA2PGSYNCX', 'ORA_TABLE', 'ITEM', 'ERRHNDL', 'RUS:ora_table;', null, 8),
('ORA2PGSYNCX', 'ORA_SCHEMA', 'ITEM', 'ERRHNDL', 'RUS:ora_schema;', null, 7),
('ORA2PGSYNCX', 'SLOT_NAME', 'ITEM', 'ERRHNDL', 'RUS:slot_name;', null, 6),
('ORA2PGSYNCX', 'RULE_NO', 'ITEM', 'ERRHNDL', 'RUS:rule_no;', null, 5),
('ORA2PGSYNCX', 'ID', 'ITEM', 'ERRHNDL', 'RUS:id;', null, 4),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'ERRHNDL', 'RUS:xout;', null, 3),
('ORA2PGSYNCX', 'DEL', 'ACTION', 'ERRHNDL', 'RUS:Удалить;ENG:Delete;', null, 2),
('ORA2PGSYNCX', 'WHAT_TO_DO', 'ITEM', 'ERRHNDL', 'RUS:S-игнорировать ошибку, R-repeat transacton;', null, 13),
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'ERRHNDL', 'RUS:notes;', null, 14),
('ORA2PGSYNCX', 'EDIT_P_ID', 'PARAM', 'ERRHNDL', 'RUS:Error ID;ENG:Error ID;', 'EDIT', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'RUS:Error handle rules;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DEL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DEL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DEL', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DEL', 'ICON', null, '{JS:if("{Property:ACTIVE}"=="EXIST" && 0{Property:Var CurrentRow}>0)"delrow";else "";}', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DEL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DEL', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)delete from {ApplicationProperty:ORA2PG_ERRHNDL} where id=0{F:ID}', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DEL', 'PROMPT', 'Y', 'RUS:[ico:{Property:ICON}]Удалить;ENG:[ico:{Property:ICON}]Delete;', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DEL', 'ROLE', null, 'DELETE', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DML_TYPE', 'CAPTION', null, 'dml_type', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DML_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DML_TYPE', 'DEFINITION', null, 'dml_type', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DML_TYPE', 'HINT', null, 'dml_type', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'DML_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT', 'COMMAND', null, 'ERRHNDLRULE', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT', 'ICON', null, '{JS:if("{Property:ACTIVE}"=="EXIST" && 0{Property:Var CurrentRow}>0)"edit";else "";}', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT', 'PROMPT', 'Y', 'RUS:[ico:{Property:ICON}]Edit;ENG:[ico:{Property:ICON}]Edit;', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT_P_ID', 'NAME', null, 'P_ID', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'EDIT_P_ID', 'VALUE', null, '{F:ID}', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ID', 'CAPTION', null, 'id', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ID', 'DEFINITION', null, 'id', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ID', 'HINT', null, 'id', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ID', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'NOTES', 'CAPTION', null, 'notes', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'NOTES', 'DEFINITION', null, 'notes', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'NOTES', 'HINT', null, 'notes', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'NOTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_SCHEMA', 'CAPTION', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_SCHEMA', 'DEFINITION', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_SCHEMA', 'HINT', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_TABLE', 'CAPTION', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_TABLE', 'DEFINITION', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_TABLE', 'HINT', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'ORA_TABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'PG_CONSTRAINT', 'CAPTION', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'PG_CONSTRAINT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'PG_CONSTRAINT', 'DEFINITION', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'PG_CONSTRAINT', 'HINT', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'PG_CONSTRAINT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'RULE_NO', 'CAPTION', null, 'rule_no', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'RULE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'RULE_NO', 'DEFINITION', null, 'rule_no', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'RULE_NO', 'HINT', null, 'rule_no', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'RULE_NO', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'RULE_NO', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SLOT_NAME', 'CAPTION', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SLOT_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SLOT_NAME', 'DEFINITION', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SLOT_NAME', 'HINT', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SLOT_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLCODE', 'CAPTION', null, 'sqlcode', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLCODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLCODE', 'DEFINITION', null, 'sqlcode', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLCODE', 'HINT', null, 'sqlcode', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLCODE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLSTATE', 'CAPTION', null, 'sqlstate', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLSTATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLSTATE', 'DEFINITION', null, 'sqlstate', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLSTATE', 'HINT', null, 'sqlstate', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'SQLSTATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'WHAT_TO_DO', 'CAPTION', null, 'S-игнорировать ошибку, R-repeat transacton', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'WHAT_TO_DO', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'WHAT_TO_DO', 'DEFINITION', null, replace($A125134147$case lower(what_to_do) when 'r' then 'Repeate' else 's' end$A125134147$,chr(13),''), null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'WHAT_TO_DO', 'HINT', null, 'Skip-skip error statement, Repeate-repeate transacton', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'WHAT_TO_DO', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'WHAT_TO_DO', 'VARIANTS', null, 'LOVD:Skip:skip error statement;Repeate:repeate transacton with error statemet', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'XOUT', 'CAPTION', null, 'xout', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'xout', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'XOUT', 'HINT', null, 'xout', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', null, 'HEADER', null, 'Error handle rules', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_ERRHNDL} ora2pg_errhndl', null),
('ORA2PGSYNCX', 'ERRHNDL', 'DEFAULT', null, 'START_MODE', null, 'SINGLE_ROW', null);
Delete from lui_t_value where form_code='ERRHNDLRULE' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='ERRHNDLRULE' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='ERRHNDLRULE' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='ERRHNDLRULE' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'ERRHNDLRULE', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'CANCEL', 'ACTION', 'ERRHNDLRULE', 'ENG:Reject;RUS:Отказаться;', null, 900),
('ORA2PGSYNCX', 'OK', 'ACTION', 'ERRHNDLRULE', 'RUS:Save;ENG:Save;', null, 1),
('ORA2PGSYNCX', 'SLOT_NAME', 'ITEM', 'ERRHNDLRULE', 'RUS:slot_name;', null, 2),
('ORA2PGSYNCX', 'P_ID', 'PARAM', 'ERRHNDLRULE', 'RUS:Rule ID;ENG:rule ID;', null, 2),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'ERRHNDLRULE', 'RUS:xout;', null, 1),
('ORA2PGSYNCX', 'DML_TYPE', 'ITEM', 'ERRHNDLRULE', 'RUS:dml_type;', null, 7),
('ORA2PGSYNCX', 'PG_CONSTRAINT', 'ITEM', 'ERRHNDLRULE', 'RUS:pg_constraint;', null, 8),
('ORA2PGSYNCX', 'P_ORA_TABLE', 'PARAM', 'ERRHNDLRULE', 'RUS:ora_table;ENG:ora_table;', null, 8),
('ORA2PGSYNCX', 'P_DML_TYPE', 'PARAM', 'ERRHNDLRULE', 'RUS:DMLtype;ENG:DMLtype;', null, 7),
('ORA2PGSYNCX', 'ORA_TABLE', 'ITEM', 'ERRHNDLRULE', 'RUS:ora_table;', null, 6),
('ORA2PGSYNCX', 'P_ORA_SCHEMA', 'PARAM', 'ERRHNDLRULE', 'RUS:ora_schema;ENG:ora_schema;', null, 4),
('ORA2PGSYNCX', 'RULE_NO', 'ITEM', 'ERRHNDLRULE', 'RUS:rule_no;', null, 3),
('ORA2PGSYNCX', 'ORA_SCHEMA', 'ITEM', 'ERRHNDLRULE', 'RUS:ora_schema;', null, 5),
('ORA2PGSYNCX', 'P_RULE_NO', 'PARAM', 'ERRHNDLRULE', 'RUS:#;ENG:#;', null, 16),
('ORA2PGSYNCX', 'SQLSTATE', 'ITEM', 'ERRHNDLRULE', 'RUS:sqlstate;', null, 14),
('ORA2PGSYNCX', 'P_SLOT_NAME', 'PARAM', 'ERRHNDLRULE', 'RUS:Slot;ENG:Slot;', null, 15),
('ORA2PGSYNCX', 'SQLCODE', 'ITEM', 'ERRHNDLRULE', 'RUS:sqlcode;', null, 13),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'ERRHNDLRULE', 'RUS:xout;ENG:xout;', null, 12),
('ORA2PGSYNCX', 'P_SQL_STATE', 'PARAM', 'ERRHNDLRULE', 'RUS:SQL_STATE;ENG:SQL_STATE;', null, 11),
('ORA2PGSYNCX', 'P_SQL_CODE', 'PARAM', 'ERRHNDLRULE', 'RUS:SQL_CODE;ENG:SQL_CODE;', null, 10),
('ORA2PGSYNCX', 'P_PG_CONSTRAINT', 'PARAM', 'ERRHNDLRULE', 'RUS:PG_CONSTRAINT;ENG:PG_CONSTRAINT;', null, 9),
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'ERRHNDLRULE', 'RUS:notes;', null, 18),
('ORA2PGSYNCX', 'P_NOTES', 'PARAM', 'ERRHNDLRULE', 'RUS:Notes;ENG:Notes;', null, 17),
('ORA2PGSYNCX', 'WHAT_TO_DO', 'ITEM', 'ERRHNDLRULE', 'RUS:S-игнорировать ошибку, R-repeat transacton;', null, 19);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'RUS:Error handle rule;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'CANCEL', 'AFTER', null, 'CANCEL', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'CANCEL', 'ICON', null, 'cancel', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'CANCEL', 'PROMPT', 'Y', 'RUS:Cancel;ENG:Cancel;', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'CANCEL', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'DML_TYPE', 'CAPTION', null, 'dml_type', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'DML_TYPE', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'DML_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'DML_TYPE', 'DEFINITION', null, '{F:P_DML_TYPE}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'DML_TYPE', 'HINT', null, 'dml_type', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'DML_TYPE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'DML_TYPE', 'VARIANTS', null, 'LOVD:INSERT:Insert;DELETE:Delete;UPDATE:Update;:Any', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'NOTES', 'CAPTION', null, 'notes', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'NOTES', 'DEFINITION', null, '{F:P_NOTES}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'NOTES', 'HINT', null, 'notes', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'NOTES', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'NOTES', 'VISIBLE', null, '5', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'OK', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'OK', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'OK', 'PROC_INITIALLY', null, replace($A240494731$PLPGSQL:(ORA2PGSYNCX)
begin
 if {F2SQL:P_ID} is null then
 insert into {ApplicationProperty:ORA2PG_ERRHNDL} (xout,rule_no,slot_name,ora_schema,ora_table,dml_type,pg_constraint,sqlcode,sqlstate,what_to_do)
 values({F2SQL:XOUT},{F2SQL:RULE_NO},{F2SQL:SLOT_NAME},{F2SQL:ORA_SCHEMA},{F2SQL:ORA_TABLE},
 {F2SQL:DML_TYPE},{F2SQL:PG_CONSTRAINT},{F2SQL:SQLCODE},{F2SQL:SQLSTATE},{F2SQL:WHAT_TO_DO});
 else
 update {ApplicationProperty:ORA2PG_ERRHNDL} 
  set rule_no={F2SQL:RULE_NO},slot_name={F2SQL:SLOT_NAME},ora_schema={F2SQL:ORA_SCHEMA},ora_table={F2SQL:ORA_TABLE},
  dml_type={F2SQL:DML_TYPE},pg_constraint={F2SQL:PG_CONSTRAINT},sqlcode={F2SQL:SQLCODE},sqlstate={F2SQL:SQLSTATE},what_to_do={F2SQL:WHAT_TO_DO}
 where id={F2SQL:P_ID};
 end if;
end;$A240494731$,chr(13),''), null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'OK', 'PROMPT', 'Y', 'RUS:Save;ENG:Save;', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'OK', 'QUESTION', null, replace($A331329178${SQL:(ORA2PGSYNCX) select 'Such rule already exisis!' from {ApplicationProperty:ORA2PG_ERRHNDL} where xout={F2SQL:P_XOUT}
and slot_name is not distinct from {F2SQL:SLOT_NAME}
and ora_schema is not distinct from {F2SQL:ORA_SCHEMA}
and ora_table is not distinct from {F2SQL:ORA_TABLE}
and dml_type is not distinct from {F2SQL:DML_TYPE}
and pg_constraint is not distinct from {F2SQL:PG_CONSTRAINT}
and sqlcode is not distinct from {F2SQL:SQLCODE}
and sqlstate is not distinct from {F2SQL:SQLSTATE}
and id!=0{F:P_ID}
}$A331329178$,chr(13),''), null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'OK', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_SCHEMA', 'CAPTION', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_SCHEMA', 'DEFINITION', null, '{F:P_ORA_SCHEMA}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_SCHEMA', 'HINT', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_SCHEMA', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_SCHEMA', 'SHOW', null, '{JS:if ("{Property:Value}")"{Property:Value}";else "Any"}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_TABLE', 'CAPTION', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_TABLE', 'DEFINITION', null, '{F:P_ORA_TABLE}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_TABLE', 'HINT', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_TABLE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'ORA_TABLE', 'SHOW', null, '{JS:if ("{Property:Value}")"{Property:Value}";else "Any"}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'PG_CONSTRAINT', 'CAPTION', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'PG_CONSTRAINT', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'PG_CONSTRAINT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'PG_CONSTRAINT', 'DEFINITION', null, '{F:P_PG_CONSTRAINT}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'PG_CONSTRAINT', 'HINT', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'PG_CONSTRAINT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'PG_CONSTRAINT', 'SHOW', null, '{JS:if ("{Property:Value}")"{Property:Value}";else "Any"}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'PG_CONSTRAINT', 'VARIANTS', null, 'LOVD::Any;{F:P_PG_CONSTRAINT}:{F:P_PG_CONSTRAINT};', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'P_RULE_NO', 'VALUE', null, '{SQL:(ORA2PGSYNCX)select  coalesce(max(rule_no),0::bigint)+1 from  {ApplicationProperty:ORA2PG_ERRHNDL} where xout={F2SQL:P_XOUT}}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'RULE_NO', 'CAPTION', null, 'rule_no', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'RULE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'RULE_NO', 'DEFINITION', null, '{F:P_RULE_NO}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'RULE_NO', 'HINT', null, 'rule_no', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'RULE_NO', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SLOT_NAME', 'CAPTION', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SLOT_NAME', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SLOT_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SLOT_NAME', 'HINT', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SLOT_NAME', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SLOT_NAME', 'VARIANTS', null, 'LOVD::Any;{F:P_SLOT_NAME}:{F:P_SLOT_NAME};', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLCODE', 'CAPTION', null, 'sqlcode', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLCODE', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLCODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLCODE', 'DEFINITION', null, '{F:P_SQL_CODE}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLCODE', 'HINT', null, 'sqlcode', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLCODE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLCODE', 'SHOW', null, '{JS:if ("{Property:Value}")"{Property:Value}";else "Any"}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLCODE', 'VARIANTS', null, 'LOVD::Any;{F:P_SQL_CODE}:{F:P_SQL_CODE};', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLSTATE', 'CAPTION', null, 'sqlstate', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLSTATE', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLSTATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLSTATE', 'DEFINITION', null, '{F:P_SQL_STATE}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLSTATE', 'HINT', null, 'sqlstate', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLSTATE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLSTATE', 'SHOW', null, '{JS:if ("{Property:Value}")"{Property:Value}";else "Any"}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'SQLSTATE', 'VARIANTS', null, 'LOVD::Any;{F:P_SQL_STATE}:{F:P_SQL_STATE};', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'WHAT_TO_DO', 'CAPTION', null, 'What to do', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'WHAT_TO_DO', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'WHAT_TO_DO', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'WHAT_TO_DO', 'DEFINITION', null, 's', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'WHAT_TO_DO', 'HINT', null, 'Skip or repeate error dml', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'WHAT_TO_DO', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'WHAT_TO_DO', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'WHAT_TO_DO', 'VARIANTS', null, 's:Skip error statemet;r:Repeate error statement;', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'XOUT', 'CAPTION', null, 'xout', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'XOUT', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'XOUT', 'DEFINITION', null, '{F:P_XOUT}', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'XOUT', 'HINT', null, 'xout', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', 'XOUT', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', null, 'HEADER', null, 'Error handle rule', null),
('ORA2PGSYNCX', 'ERRHNDLRULE', 'DEFAULT', null, 'QUERY_TEXT', null, 'select * from {ApplicationProperty:ORA2PG_ERRHNDL} ora2pg_errhndl where id=0{F:P_ID}', null);
Delete from lui_t_value where form_code='ERRLOG' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='ERRLOG' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='ERRLOG' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='ERRLOG' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'ERRLOG', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'ERRLOG', 'RUS:notes;', null, 32),
('ORA2PGSYNCX', 'SKIP_POSSIBLE', 'ITEM', 'ERRLOG', 'RUS:skip_possible;', null, 31),
('ORA2PGSYNCX', 'REPEAT_POSSIBLE', 'ITEM', 'ERRLOG', 'RUS:repeat_possible;', null, 30),
('ORA2PGSYNCX', 'USER_DECISION', 'ITEM', 'ERRLOG', 'RUS:user_decision;', null, 33),
('ORA2PGSYNCX', 'ORA_TABLE', 'ITEM', 'ERRLOG', 'RUS:ora_table;', null, 12),
('ORA2PGSYNCX', 'ORA_SCHEMA', 'ITEM', 'ERRLOG', 'RUS:ora_schema;', null, 11),
('ORA2PGSYNCX', 'SQL_STATE', 'ITEM', 'ERRLOG', 'RUS:sql_state;', null, 10),
('ORA2PGSYNCX', 'SQL_CODE', 'ITEM', 'ERRLOG', 'RUS:sql_code;', null, 9),
('ORA2PGSYNCX', 'TRUNC', 'ACTION', 'ERRLOG', 'RUS:Truncate;ENG:Truncate;', null, 1),
('ORA2PGSYNCX', 'REPEAT_MODE', 'ITEM', 'ERRLOG', 'RUS:repeat_mode;', null, 29),
('ORA2PGSYNCX', 'PGSESSION_STATE', 'ITEM', 'ERRLOG', 'RUS:pgsession_state;', null, 28),
('ORA2PGSYNCX', 'TXBYTES', 'ITEM', 'ERRLOG', 'RUS:txbytes;', null, 27),
('ORA2PGSYNCX', 'TXDMLS', 'ITEM', 'ERRLOG', 'RUS:txdmls;', null, 26),
('ORA2PGSYNCX', 'BATCHBYTES', 'ITEM', 'ERRLOG', 'RUS:batchbytes;', null, 25),
('ORA2PGSYNCX', 'BATCHDMLS', 'ITEM', 'ERRLOG', 'RUS:batchdmls;', null, 24),
('ORA2PGSYNCX', 'PHASE', 'ITEM', 'ERRLOG', 'RUS:phase;', null, 23),
('ORA2PGSYNCX', 'SKIP_BY_RULE_NO', 'ITEM', 'ERRLOG', 'RUS:skip_by_rule_no;', null, 22),
('ORA2PGSYNCX', 'SCN', 'ITEM', 'ERRLOG', 'RUS:scn;', null, 21),
('ORA2PGSYNCX', 'POSITION', 'ITEM', 'ERRLOG', 'RUS:position;', null, 20),
('ORA2PGSYNCX', 'NOINBIND', 'ITEM', 'ERRLOG', 'RUS:noinbind;', null, 19),
('ORA2PGSYNCX', 'NOINBATCH', 'ITEM', 'ERRLOG', 'RUS:noinbatch;', null, 18),
('ORA2PGSYNCX', 'MESSAGE', 'ITEM', 'ERRLOG', 'RUS:message;', null, 17),
('ORA2PGSYNCX', 'DMLTYPE', 'ITEM', 'ERRLOG', 'RUS:dmltype;', null, 16),
('ORA2PGSYNCX', 'PG_CONSTRAINT', 'ITEM', 'ERRLOG', 'RUS:pg_constraint;', null, 15),
('ORA2PGSYNCX', 'PG_TABLE', 'ITEM', 'ERRLOG', 'RUS:pg_table;', null, 14),
('ORA2PGSYNCX', 'PG_SCHEMA', 'ITEM', 'ERRLOG', 'RUS:pg_schema;', null, 13),
('ORA2PGSYNCX', 'ERR_TIMESTAMP', 'ITEM', 'ERRLOG', 'RUS:err_timestamp;', null, 8),
('ORA2PGSYNCX', 'SLOT_NAME', 'ITEM', 'ERRLOG', 'RUS:slot_name;', null, 7),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'ERRLOG', 'RUS:xout;', null, 6),
('ORA2PGSYNCX', 'STACK', 'GROUP', 'ERRLOG', 'RUS:StackTrace;ENG:StackTrace;', null, 5),
('ORA2PGSYNCX', 'STMT', 'GROUP', 'ERRLOG', 'RUS:Stmt;ENG:Stmt;', null, 4),
('ORA2PGSYNCX', 'ID', 'ITEM', 'ERRLOG', 'RUS:id;', null, 3),
('ORA2PGSYNCX', 'DEL', 'ACTION', 'ERRLOG', 'RUS:Delete;ENG:Delete;', null, 2),
('ORA2PGSYNCX', 'STACK_TRACE', 'ITEM', 'ERRLOG', 'RUS:StackTrace;', 'STACK', 29),
('ORA2PGSYNCX', 'SRCSTMT', 'ITEM', 'ERRLOG', 'RUS:Batch;', 'STMT', 15),
('ORA2PGSYNCX', 'SYNSTMT', 'ITEM', 'ERRLOG', 'RUS:Full;', 'STMT', 16),
('ORA2PGSYNCX', 'ADD_RULE', 'ACTION', 'ERRLOG', 'RUS:AddRule;ENG:AddRule;', 'ID', 1),
('ORA2PGSYNCX', 'ADD_RULE_P_ORA_SCHEMA', 'PARAM', 'ERRLOG', 'RUS:ora_schema;ENG:ora_schema;', 'ADD_RULE', 1),
('ORA2PGSYNCX', 'ADD_RULE_P_ORA_TABLE', 'PARAM', 'ERRLOG', 'RUS:ora_table;ENG:ora_table;', 'ADD_RULE', 2),
('ORA2PGSYNCX', 'ADD_RULE_P_DML_TYPE', 'PARAM', 'ERRLOG', 'RUS:DMLtype;ENG:DMLtype;', 'ADD_RULE', 3),
('ORA2PGSYNCX', 'ADD_RULE_P_PG_CONSTRAINT', 'PARAM', 'ERRLOG', 'RUS:PG_CONSTRAINT;ENG:PG_CONSTRAINT;', 'ADD_RULE', 4),
('ORA2PGSYNCX', 'ADD_RULE_P_SQL_CODE', 'PARAM', 'ERRLOG', 'RUS:SQL_CODE;ENG:SQL_CODE;', 'ADD_RULE', 5),
('ORA2PGSYNCX', 'ADD_RULE_P_SQL_STATE', 'PARAM', 'ERRLOG', 'RUS:SQL_STATE;ENG:SQL_STATE;', 'ADD_RULE', 6),
('ORA2PGSYNCX', 'ADD_RULE_P_XOUT', 'PARAM', 'ERRLOG', 'RUS:xout;ENG:xout;', 'ADD_RULE', 7),
('ORA2PGSYNCX', 'ADD_RULE_P_SLOT_NAME', 'PARAM', 'ERRLOG', 'RUS:Slot;ENG:Slot;', 'ADD_RULE', 8),
('ORA2PGSYNCX', 'ADD_RULE_P_NOTES', 'PARAM', 'ERRLOG', 'RUS:Notes;ENG:Notes;', 'ADD_RULE', 9);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'Error log', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE', 'ACTIVE', null, '{F:SKIP_POSSIBLE}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE', 'COMMAND', null, 'ERRHNDLRULE', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE', 'ICON', null, '{JS:if ("{Property:ACTIVE}"=="Y")"S_BLUE_16";else "";}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE', 'PROMPT', 'Y', 'RUS:AddRule;ENG:AddRule;', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_DML_TYPE', 'NAME', null, 'P_DML_TYPE', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_DML_TYPE', 'VALUE', null, '{F:DMLTYPE}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_NOTES', 'NAME', null, 'P_NOTES', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_NOTES', 'VALUE', null, '{F:MESSAGE}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_ORA_SCHEMA', 'NAME', null, 'P_ORA_SCHEMA', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_ORA_SCHEMA', 'VALUE', null, '{F:ORA_SCHEMA}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_ORA_TABLE', 'NAME', null, 'P_ORA_TABLE', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_ORA_TABLE', 'VALUE', null, '{F:ORA_TABLE}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_PG_CONSTRAINT', 'NAME', null, 'P_PG_CONSTRAINT', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_PG_CONSTRAINT', 'VALUE', null, '{F:PG_CONSTRAINT}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_SLOT_NAME', 'NAME', null, 'P_SLOT_NAME', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_SLOT_NAME', 'VALUE', null, '{F:P_SLOT}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_SQL_CODE', 'NAME', null, 'P_SQL_CODE', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_SQL_CODE', 'VALUE', null, '{F:SQL_CODE}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_SQL_STATE', 'NAME', null, 'P_SQL_STATE', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_SQL_STATE', 'VALUE', null, '{F:SQL_STATE}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ADD_RULE_P_XOUT', 'VALUE', null, '{F:XOUT}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHBYTES', 'CAPTION', null, 'batchbytes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHBYTES', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHBYTES', 'DEFINITION', null, 'ora2pg_errlog.batchbytes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHBYTES', 'HINT', null, 'batchbytes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHBYTES', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHDMLS', 'CAPTION', null, 'batchdmls', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHDMLS', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHDMLS', 'DEFINITION', null, 'ora2pg_errlog.batchdmls', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHDMLS', 'HINT', null, 'batchdmls', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'BATCHDMLS', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DEL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DEL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DEL', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DEL', 'EXPLANATION', null, 'Delete error record', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DEL', 'ICON', null, 'delrow', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DEL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DEL', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)delete from {ApplicationProperty:ORA2PG_ERRLOG} where id=0{F:ID}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DEL', 'PROMPT', 'Y', 'RUS:Delete;ENG:Delete;', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DMLTYPE', 'CAPTION', null, 'dmltype', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DMLTYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DMLTYPE', 'DEFINITION', null, 'ora2pg_errlog.dmltype', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DMLTYPE', 'HINT', null, 'dmltype', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'DMLTYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ERR_TIMESTAMP', 'CAPTION', null, 'err_timestamp', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ERR_TIMESTAMP', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ERR_TIMESTAMP', 'DEFINITION', null, 'ora2pg_errlog.err_timestamp', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ERR_TIMESTAMP', 'HINT', null, 'err_timestamp', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ERR_TIMESTAMP', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ID', 'CAPTION', null, 'id', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ID', 'DEFINITION', null, 'ora2pg_errlog.id', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ID', 'HINT', null, 'id', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ID', 'SORT', null, '-1', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'MESSAGE', 'CAPTION', null, 'message', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'MESSAGE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'MESSAGE', 'DEFINITION', null, 'ora2pg_errlog.message', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'MESSAGE', 'HINT', null, 'message', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'MESSAGE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBATCH', 'CAPTION', null, 'noinbatch', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBATCH', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBATCH', 'DEFINITION', null, 'ora2pg_errlog.noinbatch', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBATCH', 'HINT', null, 'noinbatch', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBATCH', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBIND', 'CAPTION', null, 'noinbind', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBIND', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBIND', 'DEFINITION', null, 'ora2pg_errlog.noinbind', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBIND', 'HINT', null, 'noinbind', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOINBIND', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOTES', 'CAPTION', null, 'notes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOTES', 'DEFINITION', null, 'ora2pg_errlog.notes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOTES', 'HINT', null, 'notes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'NOTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_SCHEMA', 'CAPTION', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_SCHEMA', 'DEFINITION', null, 'ora2pg_errlog.ora_schema', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_SCHEMA', 'HINT', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_TABLE', 'CAPTION', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_TABLE', 'DEFINITION', null, 'ora2pg_errlog.ora_table', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_TABLE', 'HINT', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'ORA_TABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_CONSTRAINT', 'CAPTION', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_CONSTRAINT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_CONSTRAINT', 'DEFINITION', null, 'ora2pg_errlog.pg_constraint', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_CONSTRAINT', 'HINT', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_CONSTRAINT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_SCHEMA', 'CAPTION', null, 'pg_schema', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_SCHEMA', 'DEFINITION', null, 'ora2pg_errlog.pg_schema', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_SCHEMA', 'HINT', null, 'pg_schema', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PGSESSION_STATE', 'CAPTION', null, 'pgsession_state', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PGSESSION_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PGSESSION_STATE', 'DEFINITION', null, 'ora2pg_errlog.pgsession_state', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PGSESSION_STATE', 'HINT', null, 'pgsession_state', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PGSESSION_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_TABLE', 'CAPTION', null, 'pg_table', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_TABLE', 'DEFINITION', null, 'ora2pg_errlog.pg_table', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_TABLE', 'HINT', null, 'pg_table', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PG_TABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PHASE', 'CAPTION', null, 'phase', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PHASE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PHASE', 'DEFINITION', null, 'ora2pg_errlog.phase', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PHASE', 'HINT', null, 'phase', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'PHASE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'POSITION', 'CAPTION', null, 'position', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'POSITION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'POSITION', 'DEFINITION', null, 'ora2pg_errlog.position', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'POSITION', 'HINT', null, 'position', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'POSITION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'POSITION', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_MODE', 'CAPTION', null, 'repeat_mode', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_MODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_MODE', 'DEFINITION', null, 'ora2pg_errlog.repeat_mode', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_MODE', 'HINT', null, 'repeat_mode', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_MODE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_POSSIBLE', 'CAPTION', null, 'repeat_possible', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_POSSIBLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_POSSIBLE', 'DEFINITION', null, 'ora2pg_errlog.repeat_possible', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_POSSIBLE', 'HINT', null, 'repeat_possible', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'REPEAT_POSSIBLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SCN', 'CAPTION', null, 'scn', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SCN', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SCN', 'DEFINITION', null, 'ora2pg_errlog.scn', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SCN', 'HINT', null, 'scn', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SCN', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_BY_RULE_NO', 'CAPTION', null, 'skip_by_rule_no', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_BY_RULE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_BY_RULE_NO', 'DEFINITION', null, 'ora2pg_errlog.skip_by_rule_no', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_BY_RULE_NO', 'HINT', null, 'skip_by_rule_no', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_BY_RULE_NO', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_POSSIBLE', 'CAPTION', null, 'skip_possible', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_POSSIBLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_POSSIBLE', 'DEFINITION', null, 'ora2pg_errlog.skip_possible', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_POSSIBLE', 'HINT', null, 'skip_possible', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SKIP_POSSIBLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SLOT_NAME', 'CAPTION', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SLOT_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SLOT_NAME', 'DEFINITION', null, 'ora2pg_errlog.slot_name', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SLOT_NAME', 'HINT', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SLOT_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_CODE', 'CAPTION', null, 'sql_code', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_CODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_CODE', 'DEFINITION', null, 'ora2pg_errlog.sql_code', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_CODE', 'HINT', null, 'sql_code', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_CODE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_STATE', 'CAPTION', null, 'sql_state', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_STATE', 'DEFINITION', null, 'ora2pg_errlog.sql_state', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_STATE', 'HINT', null, 'sql_state', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SQL_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SRCSTMT', 'CAPTION', null, 'srcstmt', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SRCSTMT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SRCSTMT', 'DEFINITION', null, 'ora2pg_errlog.srcstmt', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SRCSTMT', 'HINT', null, 'srcstmt', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SRCSTMT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'STACK', 'GROUP_TYPE', null, 'OVERFLOW', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'STACK', 'TITLE', null, 'Stack Trace', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'STACK_TRACE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'STACK_TRACE', 'DEFINITION', null, 'ora2pg_errlog.stack_trace', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'STACK_TRACE', 'HINT', null, 'stack_trace', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'STACK_TRACE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'STMT', 'GROUP_TYPE', null, 'OVERFLOW', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'STMT', 'TITLE', null, 'Statement', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SYNSTMT', 'CAPTION', null, 'synstmt', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SYNSTMT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SYNSTMT', 'DEFINITION', null, 'ora2pg_errlog.synstmt', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SYNSTMT', 'HINT', null, 'synstmt', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'SYNSTMT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TRUNC', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TRUNC', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TRUNC', 'EXPLANATION', null, 'Truncate error log table', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TRUNC', 'ICON', null, 'hiderow', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TRUNC', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TRUNC', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)truncate table {ApplicationProperty:ORA2PG_ERRLOG}', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TRUNC', 'PROMPT', 'Y', 'RUS:Truncate;ENG:Truncate;', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TRUNC', 'QUESTION', null, 'truncate table {ApplicationProperty:ORA2PG_ERRLOG} ?', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXBYTES', 'CAPTION', null, 'txbytes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXBYTES', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXBYTES', 'DEFINITION', null, 'ora2pg_errlog.txbytes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXBYTES', 'HINT', null, 'txbytes', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXBYTES', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXDMLS', 'CAPTION', null, 'txdmls', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXDMLS', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXDMLS', 'DEFINITION', null, 'ora2pg_errlog.txdmls', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXDMLS', 'HINT', null, 'txdmls', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'TXDMLS', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'USER_DECISION', 'CAPTION', null, 'user_decision', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'USER_DECISION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'USER_DECISION', 'DEFINITION', null, 'ora2pg_errlog.user_decision', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'USER_DECISION', 'HINT', null, 'user solution', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'USER_DECISION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'XOUT', 'CAPTION', null, 'xout', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_errlog.xout', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'XOUT', 'HINT', null, 'xout', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', null, 'HEADER', null, 'Error log', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', null, 'LINE_FEED', null, 'WRAP', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_ERRLOG} ora2pg_errlog', null),
('ORA2PGSYNCX', 'ERRLOG', 'DEFAULT', null, 'START_MODE', null, 'SINGLE_ROW', null);
Delete from lui_t_value where form_code='ERROR' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='ERROR' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='ERROR' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='ERROR' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'ERROR', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'ID', 'ITEM', 'ERROR', 'RUS:id;', null, 34),
('ORA2PGSYNCX', 'MAIN', 'GROUP', 'ERROR', 'RUS:Main;ENG:Main;', null, 1),
('ORA2PGSYNCX', 'P_ID', 'PARAM', 'ERROR', 'RUS:Error ID;ENG:Error ID;', null, 2),
('ORA2PGSYNCX', 'ABORT', 'ACTION', 'ERROR', 'RUS:Abort;ENG:Abort;', null, 1),
('ORA2PGSYNCX', 'STACK', 'GROUP', 'ERROR', 'RUS:StackTrace;ENG:StackTrace;', null, 9),
('ORA2PGSYNCX', 'STMT', 'GROUP', 'ERROR', 'RUS:Statement;ENG:Statement;', null, 8),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'ERROR', 'RUS:xout;ENG:xout;', null, 7),
('ORA2PGSYNCX', 'RESTART', 'ACTION', 'ERROR', 'RUS:Restart;ENG:Restart;', null, 2),
('ORA2PGSYNCX', 'P_NOTROT', 'PARAM', 'ERROR', 'RUS:NOTROT;ENG:NOTROT;', null, 14),
('ORA2PGSYNCX', 'P_SLOT', 'PARAM', 'ERROR', 'RUS:Slot;ENG:Slot;', null, 13),
('ORA2PGSYNCX', 'SLOT_NAME', 'ITEM', 'ERROR', 'RUS:slot_name;', null, 12),
('ORA2PGSYNCX', 'NOTE', 'GROUP', 'ERROR', 'RUS:Notes;ENG:Notes;', null, 10),
('ORA2PGSYNCX', 'SKIP', 'ACTION', 'ERROR', 'RUS:Skip;ENG:Skip;', null, 3),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'ERROR', 'RUS:xout;', null, 11),
('ORA2PGSYNCX', 'REPEAT', 'ACTION', 'ERROR', 'RUS:Repeat;ENG:Repeat;', null, 4),
('ORA2PGSYNCX', 'ADD_RULE', 'ACTION', 'ERROR', 'RUS:AddRule;ENG:AddRule;', null, 5),
('ORA2PGSYNCX', 'CLOSE', 'ACTION', 'ERROR', 'RUS:Close;ENG:Close;', null, 6),
('ORA2PGSYNCX', 'MAIN_G1', 'GROUP', 'ERROR', 'RUS:G1;ENG:G1;', 'MAIN', 1),
('ORA2PGSYNCX', 'MAIN_G2', 'GROUP', 'ERROR', 'RUS:G2;ENG:G2;', 'MAIN', 2),
('ORA2PGSYNCX', 'MAIN_G3', 'GROUP', 'ERROR', 'RUS:G3;ENG:G3;', 'MAIN', 22),
('ORA2PGSYNCX', 'MESSAGE', 'ITEM', 'ERROR', 'RUS:message;', 'MAIN', 3),
('ORA2PGSYNCX', 'MAIN_G4', 'GROUP', 'ERROR', 'RUS:G4;ENG:G4;', 'MAIN', 23),
('ORA2PGSYNCX', 'MAIN_G6', 'GROUP', 'ERROR', 'RUS:G6;ENG:G6;', 'MAIN', 24),
('ORA2PGSYNCX', 'STACK_TRACE', 'ITEM', 'ERROR', 'RUS:stack_trace;', 'STACK', 29),
('ORA2PGSYNCX', 'SRCSTMT', 'ITEM', 'ERROR', 'RUS:srcstmt;', 'STMT', 15),
('ORA2PGSYNCX', 'SYNSTMT', 'ITEM', 'ERROR', 'RUS:synstmt;', 'STMT', 16),
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'ERROR', 'RUS:notes;', 'NOTE', 32),
('ORA2PGSYNCX', 'ADD_RULE_P_ORA_SCHEMA', 'PARAM', 'ERROR', 'RUS:ora_schema;ENG:ora_schema;', 'ADD_RULE', 1),
('ORA2PGSYNCX', 'ADD_RULE_P_ORA_TABLE', 'PARAM', 'ERROR', 'RUS:ora_table;ENG:ora_table;', 'ADD_RULE', 2),
('ORA2PGSYNCX', 'ADD_RULE_P_DML_TYPE', 'PARAM', 'ERROR', 'RUS:DMLtype;ENG:DMLtype;', 'ADD_RULE', 3),
('ORA2PGSYNCX', 'ADD_RULE_P_PG_CONSTRAINT', 'PARAM', 'ERROR', 'RUS:PG_CONSTRAINT;ENG:PG_CONSTRAINT;', 'ADD_RULE', 4),
('ORA2PGSYNCX', 'ADD_RULE_P_SQL_CODE', 'PARAM', 'ERROR', 'RUS:SQL_CODE;ENG:SQL_CODE;', 'ADD_RULE', 5),
('ORA2PGSYNCX', 'ADD_RULE_P_SQL_STATE', 'PARAM', 'ERROR', 'RUS:SQL_STATE;ENG:SQL_STATE;', 'ADD_RULE', 6),
('ORA2PGSYNCX', 'ADD_RULE_P_XOUT', 'PARAM', 'ERROR', 'RUS:xout;ENG:xout;', 'ADD_RULE', 7),
('ORA2PGSYNCX', 'ADD_RULE_P_SLOT_NAME', 'PARAM', 'ERROR', 'RUS:Slot;ENG:Slot;', 'ADD_RULE', 8),
('ORA2PGSYNCX', 'ADD_RULE_P_NOTES', 'PARAM', 'ERROR', 'RUS:Notes;ENG:Notes;', 'ADD_RULE', 9),
('ORA2PGSYNCX', 'ERR_TIMESTAMP', 'ITEM', 'ERROR', 'RUS:err_timestamp;', 'MAIN_G1', 3),
('ORA2PGSYNCX', 'PHASE', 'ITEM', 'ERROR', 'RUS:phase;', 'MAIN_G1', 6),
('ORA2PGSYNCX', 'DMLTYPE', 'ITEM', 'ERROR', 'RUS:dmltype;', 'MAIN_G1', 7),
('ORA2PGSYNCX', 'SQL_CODE', 'ITEM', 'ERROR', 'RUS:sql_code;', 'MAIN_G1', 8),
('ORA2PGSYNCX', 'SQL_STATE', 'ITEM', 'ERROR', 'RUS:sql_state;', 'MAIN_G1', 9),
('ORA2PGSYNCX', 'ORA_SCHEMA', 'ITEM', 'ERROR', 'RUS:ora_schema;', 'MAIN_G2', 10),
('ORA2PGSYNCX', 'ORA_TABLE', 'ITEM', 'ERROR', 'RUS:ora_table;', 'MAIN_G2', 11),
('ORA2PGSYNCX', 'PG_SCHEMA', 'ITEM', 'ERROR', 'RUS:pg_schema;', 'MAIN_G2', 12),
('ORA2PGSYNCX', 'PG_TABLE', 'ITEM', 'ERROR', 'RUS:pg_table;', 'MAIN_G2', 13),
('ORA2PGSYNCX', 'PG_CONSTRAINT', 'ITEM', 'ERROR', 'RUS:pg_constraint;', 'MAIN_G2', 14),
('ORA2PGSYNCX', 'NOINBATCH', 'ITEM', 'ERROR', 'RUS:noinbatch;', 'MAIN_G3', 17),
('ORA2PGSYNCX', 'NOINBIND', 'ITEM', 'ERROR', 'RUS:noinbind;', 'MAIN_G3', 18),
('ORA2PGSYNCX', 'BATCHDMLS', 'ITEM', 'ERROR', 'RUS:batchdmls;', 'MAIN_G3', 23),
('ORA2PGSYNCX', 'BATCHBYTES', 'ITEM', 'ERROR', 'RUS:batchbytes;', 'MAIN_G3', 24),
('ORA2PGSYNCX', 'TXDMLS', 'ITEM', 'ERROR', 'RUS:txdmls;', 'MAIN_G3', 25),
('ORA2PGSYNCX', 'TXBYTES', 'ITEM', 'ERROR', 'RUS:txbytes;', 'MAIN_G3', 26),
('ORA2PGSYNCX', 'PGSESSION_STATE', 'ITEM', 'ERROR', 'RUS:pgsession_state;', 'MAIN_G4', 27),
('ORA2PGSYNCX', 'REPEAT_MODE', 'ITEM', 'ERROR', 'RUS:repeat_mode;', 'MAIN_G4', 28),
('ORA2PGSYNCX', 'REPEAT_POSSIBLE', 'ITEM', 'ERROR', 'RUS:repeat_possible;', 'MAIN_G4', 30),
('ORA2PGSYNCX', 'SKIP_POSSIBLE', 'ITEM', 'ERROR', 'RUS:skip_possible;', 'MAIN_G4', 31),
('ORA2PGSYNCX', 'SCN', 'ITEM', 'ERROR', 'RUS:scn;', 'MAIN_G4', 20),
('ORA2PGSYNCX', 'POSITION', 'ITEM', 'ERROR', 'RUS:position;', 'MAIN_G6', 19),
('ORA2PGSYNCX', 'SKIP_BY_RULE_NO', 'ITEM', 'ERROR', 'RUS:skip_by_rule_no;', 'MAIN_G6', 21),
('ORA2PGSYNCX', 'USER_DECISION', 'ITEM', 'ERROR', 'RUS:usersolution;', 'MAIN_G6', 36),
('ORA2PGSYNCX', 'REPEAT_TX_BY_RULE_NO', 'ITEM', 'ERROR', 'RUS:repeat_by_rule_no;', 'MAIN_G6', 33),
('ORA2PGSYNCX', 'REPEAT_UNSUCCESSFUL', 'ITEM', 'ERROR', 'RUS:repeat_unsuccessful;', 'MAIN_G6', 35);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'RUS:ERROR;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ABORT', 'ACTIVE', null, '{F:P_NOTROT}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ABORT', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ABORT', 'DISPLAY', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ABORT', 'ICON', null, 'S_RED_16', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ABORT', 'PROC_INITIALLY', null, replace($A131294484$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_ERRLOG} set notes = {F2SQL:NOTES}, user_decision='ABORT'
where id=0{F:P_ID}$A131294484$,chr(13),''), null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ABORT', 'PROMPT', 'Y', 'RUS:Abort;ENG:Abort;', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE', 'ACTIVE', null, '{F:SKIP_POSSIBLE}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE', 'COMMAND', null, 'ERRHNDLRULE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE', 'DISPLAY', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE', 'ICON', null, 'S_BLUE_16', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE', 'PROMPT', 'Y', 'RUS:AddRule;ENG:AddRule;', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_DML_TYPE', 'NAME', null, 'P_DML_TYPE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_DML_TYPE', 'VALUE', null, '{F:DMLTYPE}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_NOTES', 'NAME', null, 'P_NOTES', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_NOTES', 'VALUE', null, '{F:MESSAGE}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_ORA_SCHEMA', 'NAME', null, 'P_ORA_SCHEMA', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_ORA_SCHEMA', 'VALUE', null, '{F:ORA_SCHEMA}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_ORA_TABLE', 'NAME', null, 'P_ORA_TABLE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_ORA_TABLE', 'VALUE', null, '{F:ORA_TABLE}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_PG_CONSTRAINT', 'NAME', null, 'P_PG_CONSTRAINT', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_PG_CONSTRAINT', 'VALUE', null, '{F:PG_CONSTRAINT}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_SLOT_NAME', 'NAME', null, 'P_SLOT_NAME', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_SLOT_NAME', 'VALUE', null, '{F:P_SLOT}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_SQL_CODE', 'NAME', null, 'P_SQL_CODE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_SQL_CODE', 'VALUE', null, '{F:SQL_CODE}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_SQL_STATE', 'NAME', null, 'P_SQL_STATE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_SQL_STATE', 'VALUE', null, '{F:SQL_STATE}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ADD_RULE_P_XOUT', 'VALUE', null, '{F:P_XOUT}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHBYTES', 'CAPTION', null, 'batchbytes', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHBYTES', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHBYTES', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHBYTES', 'HINT', null, 'batchbytes', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHBYTES', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHBYTES', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHDMLS', 'CAPTION', null, 'batchdmls', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHDMLS', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHDMLS', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHDMLS', 'HINT', null, 'batchdmls', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHDMLS', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'BATCHDMLS', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'CLOSE', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'CLOSE', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'CLOSE', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_ERRLOG} set notes = {F2SQL:NOTES} where id=0{F:P_ID}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'CLOSE', 'PROMPT', 'Y', 'RUS:Выход;ENG:Exit;', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'CLOSE', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'DMLTYPE', 'CAPTION', null, 'dmltype', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'DMLTYPE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'DMLTYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'DMLTYPE', 'HINT', null, 'dmltype', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'DMLTYPE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ERR_TIMESTAMP', 'CAPTION', null, 'err_timestamp', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ERR_TIMESTAMP', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ERR_TIMESTAMP', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ERR_TIMESTAMP', 'FORMAT', null, 'dd.mm.yyyy hh24:mi:ss.ms', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ERR_TIMESTAMP', 'HINT', null, 'err_timestamp', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ERR_TIMESTAMP', 'ITEM_TEMPLATE', null, 'FIELD_DATETIME', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ERR_TIMESTAMP', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ID', 'CAPTION', null, 'id', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ID', 'HINT', null, 'id', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ID', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ID', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ID', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN', 'GROUP_TYPE', null, 'TAB', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN', 'POSITION', null, 'UP', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN', 'TITLE', null, 'Main', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G1', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G1', 'POSITION', null, 'UP', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G2', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G2', 'POSITION', null, 'UP', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G3', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G3', 'POSITION', null, 'UP', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G4', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G4', 'POSITION', null, 'UP', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G6', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MAIN_G6', 'POSITION', null, 'UP', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MESSAGE', 'CAPTION', null, 'message', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MESSAGE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MESSAGE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MESSAGE', 'HINT', null, 'message', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MESSAGE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'MESSAGE', 'VISIBLE', null, '5', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBATCH', 'CAPTION', null, 'noinbatch', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBATCH', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBATCH', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBATCH', 'HINT', null, 'noinbatch', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBATCH', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBIND', 'CAPTION', null, 'noinbind', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBIND', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBIND', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBIND', 'HINT', null, 'noinbind', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBIND', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOINBIND', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOTE', 'GROUP_TYPE', null, 'TAB', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOTE', 'TITLE', null, 'Notes', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOTES', 'CHANGING', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOTES', 'HINT', null, 'notes', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOTES', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'NOTES', 'VISIBLE', null, '5/10', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_SCHEMA', 'CAPTION', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_SCHEMA', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_SCHEMA', 'HINT', null, 'ora_schema', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_SCHEMA', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_TABLE', 'CAPTION', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_TABLE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_TABLE', 'HINT', null, 'ora_table', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'ORA_TABLE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_CONSTRAINT', 'CAPTION', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_CONSTRAINT', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_CONSTRAINT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_CONSTRAINT', 'HINT', null, 'pg_constraint', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_CONSTRAINT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_SCHEMA', 'CAPTION', null, 'pg_schema', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_SCHEMA', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_SCHEMA', 'HINT', null, 'pg_schema', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_SCHEMA', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PGSESSION_STATE', 'CAPTION', null, 'pgsession_state', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PGSESSION_STATE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PGSESSION_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PGSESSION_STATE', 'HINT', null, 'pgsession_state', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PGSESSION_STATE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PGSESSION_STATE', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PGSESSION_STATE', 'VISUALIZATION', null, '{JS:if ("{F:PGSESSION_STATE}"=="TERMINATED")"BACKGROUND(red)";else "";}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_TABLE', 'CAPTION', null, 'pg_table', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_TABLE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_TABLE', 'HINT', null, 'pg_table', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PG_TABLE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PHASE', 'CAPTION', null, 'phase', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PHASE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PHASE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PHASE', 'HINT', null, 'phase', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'PHASE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'P_ID', 'VALUE', null, '{SQL:(ORA2PGSYNCX) select max(id) from {ApplicationProperty:ORA2PG_ERRLOG} where xout={F2SQL:P_XOUT} and slot_name={F2SQL:P_SLOT}}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'P_NOTROT', 'VALUE', null, replace($A968867328${SQL:(ORA2PGSYNCX)select case when count(*)=0 then 'N' else 'Y' end 
from pg_stat_activity where pid=0{SQL:(ORA2PGSYNCX)select pg_maintainer_pid from  {ApplicationProperty:ORA2PG_ERRLOG} where id=0{F:P_ID}}}$A968867328$,chr(13),''), null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'POSITION', 'CAPTION', null, 'position', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'POSITION', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'POSITION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'POSITION', 'HINT', null, 'position', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'POSITION', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'POSITION', 'VISIBLE', null, '1', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT', 'ACTIVE', null, '{JS: if ("{F:P_NOTROT}"=="Y" && "{F:REPEAT_POSSIBLE}"=="Y")"Y";else "N";}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT', 'ICON', null, 'S_GREEN_16', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT', 'PROC_INITIALLY', null, replace($A840248750$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_ERRLOG} set notes = {F2SQL:NOTES}, user_decision='repeat'
where id=0{F:P_ID}$A840248750$,chr(13),''), null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT', 'PROMPT', 'Y', 'RUS:Repeat;ENG:Repeat;', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_MODE', 'CAPTION', null, 'repeat_mode', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_MODE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_MODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_MODE', 'HINT', null, 'repeat_mode', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_MODE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_MODE', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_MODE', 'VISUALIZATION', null, '{JS:if ("{F:REPEAT_MODE}"=="Y")"BACKGROUND(red)";else "";}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_POSSIBLE', 'CAPTION', null, 'repeat_possible', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_POSSIBLE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_POSSIBLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_POSSIBLE', 'HINT', null, 'repeat_possible', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_POSSIBLE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_POSSIBLE', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_TX_BY_RULE_NO', 'CAPTION', null, 'repeat_by_rule_no', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_TX_BY_RULE_NO', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_TX_BY_RULE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_TX_BY_RULE_NO', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_UNSUCCESSFUL', 'CAPTION', null, 'repeat_unsuccessful', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_UNSUCCESSFUL', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_UNSUCCESSFUL', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'REPEAT_UNSUCCESSFUL', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'RESTART', 'ACTIVE', null, '{F:P_NOTROT}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'RESTART', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'RESTART', 'DISPLAY', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'RESTART', 'ICON', null, 'S_YELLOW_16', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'RESTART', 'PROC_INITIALLY', null, replace($A436485948$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_ERRLOG} set notes = {F2SQL:NOTES}, user_decision='RESTART'
where id=0{F:P_ID}$A436485948$,chr(13),''), null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'RESTART', 'PROMPT', 'Y', 'RUS:Restart;ENG:Restart;', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SCN', 'CAPTION', null, 'scn', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SCN', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SCN', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SCN', 'HINT', null, 'scn', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SCN', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP', 'ACTIVE', null, '{JS: if ("{F:P_NOTROT}"=="Y" && "{F:SKIP_POSSIBLE}"=="Y")"Y";else "N";}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP', 'DISPLAY', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP', 'ICON', null, 'S_GRAY_16', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP', 'PROC_INITIALLY', null, replace($A607911026$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_ERRLOG} set notes = {F2SQL:NOTES}, user_decision='skip'
where id=0{F:P_ID}$A607911026$,chr(13),''), null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP', 'PROMPT', 'Y', 'RUS:Skip;ENG:Skip;', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_BY_RULE_NO', 'CAPTION', null, 'skip_by_rule_no', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_BY_RULE_NO', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_BY_RULE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_BY_RULE_NO', 'HINT', null, 'skip_by_rule_no', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_BY_RULE_NO', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_POSSIBLE', 'CAPTION', null, 'skip_possible', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_POSSIBLE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_POSSIBLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_POSSIBLE', 'HINT', null, 'skip_possible', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_POSSIBLE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SKIP_POSSIBLE', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SLOT_NAME', 'CAPTION', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SLOT_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SLOT_NAME', 'HINT', null, 'slot_name', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SLOT_NAME', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SLOT_NAME', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SLOT_NAME', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_CODE', 'CAPTION', null, 'sql_code', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_CODE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_CODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_CODE', 'HINT', null, 'sql_code', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_CODE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_STATE', 'CAPTION', null, 'sql_state', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_STATE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_STATE', 'HINT', null, 'sql_state', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SQL_STATE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SRCSTMT', 'CAPTION', null, 'Batch', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SRCSTMT', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SRCSTMT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SRCSTMT', 'HINT', null, 'srcstmt', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SRCSTMT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SRCSTMT', 'VISIBLE', null, '1/3', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STACK', 'GROUP_TYPE', null, 'TAB', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STACK', 'TITLE', null, 'StackTrace', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STACK_TRACE', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STACK_TRACE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STACK_TRACE', 'HINT', null, 'stack_trace', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STACK_TRACE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STACK_TRACE', 'VISIBLE', null, '5/10', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STMT', 'GROUP_TYPE', null, 'TAB', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'STMT', 'TITLE', null, 'Statement', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SYNSTMT', 'CAPTION', null, 'Full', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SYNSTMT', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SYNSTMT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SYNSTMT', 'HINT', null, 'synstmt', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SYNSTMT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'SYNSTMT', 'VISIBLE', null, '1/3', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXBYTES', 'CAPTION', null, 'txbytes', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXBYTES', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXBYTES', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXBYTES', 'HINT', null, 'txbytes', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXBYTES', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXBYTES', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXDMLS', 'CAPTION', null, 'txdmls', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXDMLS', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXDMLS', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXDMLS', 'HINT', null, 'txdmls', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXDMLS', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'TXDMLS', 'OPTIONAL', null, 'Y', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'USER_DECISION', 'CAPTION', null, 'user_decision', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'USER_DECISION', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'USER_DECISION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'USER_DECISION', 'HINT', null, 'user decision', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'USER_DECISION', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'XOUT', 'CAPTION', null, 'xout', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'XOUT', 'HINT', null, 'xout', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'XOUT', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', 'XOUT', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', null, 'HEADER', null, 'ERROR {F:P_XOUT}  {F:P_SLOT} {F:P_ID}', null),
('ORA2PGSYNCX', 'ERROR', 'DEFAULT', null, 'QUERY_TEXT', null, 'select * from {ApplicationProperty:ORA2PG_ERRLOG} ora2pg_errlog where id=0{F:P_ID}', null);
Delete from lui_t_value where form_code='FORMULA_COLS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='FORMULA_COLS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='FORMULA_COLS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='FORMULA_COLS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'FORMULA_COLS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'ID', 'ITEM', 'FORMULA_COLS', 'RUS:ID описания;', null, 1),
('ORA2PGSYNCX', 'ORACOLUMN_ID', 'ITEM', 'FORMULA_COLS', 'RUS:Ora_id;', null, 11),
('ORA2PGSYNCX', 'ORA_UK', 'ITEM', 'FORMULA_COLS', 'RUS:uk;', null, 10),
('ORA2PGSYNCX', 'ORA_PK', 'ITEM', 'FORMULA_COLS', 'RUS:pk;', null, 9),
('ORA2PGSYNCX', 'ORA_TYPE', 'ITEM', 'FORMULA_COLS', 'RUS:Datatype;', null, 8),
('ORA2PGSYNCX', 'P_ORA_TABLE', 'PARAM', 'FORMULA_COLS', 'RUS:ora_table;ENG:ora_table;', null, 4),
('ORA2PGSYNCX', 'ORA_COLUMN', 'ITEM', 'FORMULA_COLS', 'RUS:Column name;', null, 3),
('ORA2PGSYNCX', 'P_ORA_SCHEMA', 'PARAM', 'FORMULA_COLS', 'RUS:ora_schema;ENG:ora_schema;', null, 2),
('ORA2PGSYNCX', 'NEW', 'ITEM', 'FORMULA_COLS', 'RUS:New;ENG:New;', null, 6),
('ORA2PGSYNCX', 'OLD', 'ITEM', 'FORMULA_COLS', 'RUS:Old;ENG:Old;', null, 7),
('ORA2PGSYNCX', 'NEW_GET', 'ACTION', 'FORMULA_COLS', 'RUS:get;ENG:get;', 'NEW', 1),
('ORA2PGSYNCX', 'OLD_GET', 'ACTION', 'FORMULA_COLS', 'RUS:get;ENG:get;', 'OLD', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'RUS:Columns;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ID', 'CAPTION', null, 'ID', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ID', 'DEFINITION', null, 'ora2pg_col.id', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ID', 'HINT', null, 'ID описания', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ID', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW', 'CAPTION', 'Y', 'RUS:New;ENG:New;', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW', 'DEFINITION', null, '', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW_GET', 'ACTIVE', null, replace($A617000702${JS: if ("{F:ORA_TYPE}"=="CHAR" 
      || "{F:ORA_TYPE}"=="VARCHAR2" 
      || "{F:ORA_TYPE}"=="NVARCHAR2" 
      || "{F:ORA_TYPE}"=="NUMBER" 
      || "{F:ORA_TYPE}"=="FLOAT" 
      || "{F:ORA_TYPE}"=="BINARY_FLOAT" 
      || "{F:ORA_TYPE}"=="BINARY_DOUBLE"
      || "{F:ORA_TYPE}"=="DATE" 
      || "{F:ORA_TYPE}"=="TIMESTAMP"
      || "{F:ORA_TYPE}"=="TIMESTAMP WITH TIME ZONE"
      || "{F:ORA_TYPE}"=="TIMESTAMP WITH LOCAL TIME ZONE"
      )"Y";
      else "N";}$A617000702$,chr(13),''), null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW_GET', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW_GET', 'ICON', null, '{JS:if ("{Property:ACTIVE}"=="Y")"ok";else "";}', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW_GET', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW_GET', 'PROC_FINALLY', null, 'Focus:{Property:Var ParentFormID}.CONDITION', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW_GET', 'PROC_INITIALLY', null, 'F:{FormProperty:Var ParentFormID}.CONDITION={JS:"{ElementProperty:{FormProperty:Var ParentFormID}.CONDITION.ValueWithCursor}".replace(String.fromCharCode(166), "{F:ORA_COLUMN}[NEW]"+ String.fromCharCode(166))}', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'NEW_GET', 'PROMPT', 'Y', 'RUS:Get column into formula;ENG:Get column into formula;', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD', 'CAPTION', null, 'Old', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD', 'DEFINITION', null, '', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD_GET', 'ACTIVE', null, replace($A286668790${JS: if ("{F:ORA_TYPE}"=="CHAR" 
      || "{F:ORA_TYPE}"=="VARCHAR2" 
      || "{F:ORA_TYPE}"=="NVARCHAR2" 
      || "{F:ORA_TYPE}"=="NUMBER" 
      || "{F:ORA_TYPE}"=="FLOAT" 
      || "{F:ORA_TYPE}"=="BINARY_FLOAT" 
      || "{F:ORA_TYPE}"=="BINARY_DOUBLE"
      || "{F:ORA_TYPE}"=="DATE" 
      || "{F:ORA_TYPE}"=="TIMESTAMP"
      || "{F:ORA_TYPE}"=="TIMESTAMP WITH TIME ZONE"
      || "{F:ORA_TYPE}"=="TIMESTAMP WITH LOCAL TIME ZONE"
      )"Y";
      else "N";}$A286668790$,chr(13),''), null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD_GET', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD_GET', 'ICON', null, '{JS:if ("{Property:ACTIVE}"=="Y")"ok";else "";}', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD_GET', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD_GET', 'PROC_FINALLY', null, 'Focus:{Property:Var ParentFormID}.CONDITION', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD_GET', 'PROC_INITIALLY', null, 'F:{FormProperty:Var ParentFormID}.CONDITION={JS:"{ElementProperty:{FormProperty:Var ParentFormID}.CONDITION.ValueWithCursor}".replace(String.fromCharCode(166), "{F:ORA_COLUMN}[OLD]"+ String.fromCharCode(166))}', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'OLD_GET', 'PROMPT', 'Y', 'RUS:Get column into formula;ENG:Get column into formula;', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_COLUMN', 'CAPTION', null, 'Column name', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_COLUMN', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_COLUMN', 'DEFINITION', null, 'ora2pg_col.ora_column', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_COLUMN', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORACOLUMN_ID', 'CAPTION', null, 'id', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORACOLUMN_ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORACOLUMN_ID', 'DEFINITION', null, 'ora2pg_col.oracolumn_id', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORACOLUMN_ID', 'HINT', null, 'id', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORACOLUMN_ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORACOLUMN_ID', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_PK', 'CAPTION', null, 'pk', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_PK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_PK', 'DEFINITION', null, 'ora2pg_col.ora_pk', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_PK', 'HINT', null, 'pk', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_PK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_TYPE', 'CAPTION', null, 'Datatype', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_TYPE', 'DEFINITION', null, 'ora2pg_col.ora_type', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_UK', 'CAPTION', null, 'uk', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_UK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_UK', 'DEFINITION', null, 'ora2pg_col.ora_uk', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', 'ORA_UK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', null, 'HEADER', null, 'Columns', null),
('ORA2PGSYNCX', 'FORMULA_COLS', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_COL} ora2pg_col where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}', null);
Delete from lui_t_value where form_code='FORMULA_COLS_PG' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='FORMULA_COLS_PG' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='FORMULA_COLS_PG' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='FORMULA_COLS_PG' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'ID', 'ITEM', 'FORMULA_COLS_PG', 'RUS:ID описания;', null, 1),
('ORA2PGSYNCX', 'ORA_UK', 'ITEM', 'FORMULA_COLS_PG', 'RUS:uk;', null, 11),
('ORA2PGSYNCX', 'ORA_PK', 'ITEM', 'FORMULA_COLS_PG', 'RUS:pk;', null, 10),
('ORA2PGSYNCX', 'ORA_TYPE', 'ITEM', 'FORMULA_COLS_PG', 'RUS:Datatype;', null, 9),
('ORA2PGSYNCX', 'P_ORA_TABLE', 'PARAM', 'FORMULA_COLS_PG', 'RUS:ora_table;ENG:ora_table;', null, 5),
('ORA2PGSYNCX', 'P_ORA_SCHEMA', 'PARAM', 'FORMULA_COLS_PG', 'RUS:ora_schema;ENG:ora_schema;', null, 2),
('ORA2PGSYNCX', 'PG_COLUMN', 'ITEM', 'FORMULA_COLS_PG', 'RUS:Column name;', null, 7),
('ORA2PGSYNCX', 'ORA_COLUMN', 'ITEM', 'FORMULA_COLS_PG', 'RUS:ora_column;ENG:ora_column;', null, 8),
('ORA2PGSYNCX', 'ORACOLUMN_ID', 'ITEM', 'FORMULA_COLS_PG', 'RUS:Ora_id;', null, 12),
('ORA2PGSYNCX', 'GET', 'ITEM', 'FORMULA_COLS_PG', 'RUS:Get;ENG:Get;', null, 3),
('ORA2PGSYNCX', 'P_DB', 'PARAM', 'FORMULA_COLS_PG', 'RUS:DB;ENG:DB;', null, 6),
('ORA2PGSYNCX', 'AGET', 'ACTION', 'FORMULA_COLS_PG', 'RUS:get;ENG:get;', 'GET', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'RUS:Pg Columns;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'AGET', 'ACTIVE', null, replace($A326784729${JS: if ("{F:ORA_TYPE}"=="CHAR" 
      || "{F:ORA_TYPE}"=="VARCHAR2" 
      || "{F:ORA_TYPE}"=="NVARCHAR2" 
      || "{F:ORA_TYPE}"=="NUMBER" 
      || "{F:ORA_TYPE}"=="FLOAT" 
      || "{F:ORA_TYPE}"=="BINARY_FLOAT" 
      || "{F:ORA_TYPE}"=="BINARY_DOUBLE"
      || "{F:ORA_TYPE}"=="DATE" 
      || "{F:ORA_TYPE}"=="TIMESTAMP"
      || "{F:ORA_TYPE}"=="TIMESTAMP WITH TIME ZONE"
      || "{F:ORA_TYPE}"=="TIMESTAMP WITH LOCAL TIME ZONE"
      )"Y";
      else "N";}$A326784729$,chr(13),''), null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'AGET', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'AGET', 'ICON', null, '{JS:if ("{Property:ACTIVE}"=="Y")"ok";else "";}', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'AGET', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'AGET', 'PROC_FINALLY', null, 'Focus:{Property:Var ParentFormID}.CONDITION', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'AGET', 'PROC_INITIALLY', null, replace($A507915690$F:{FormProperty:Var ParentFormID}.CONDITION={JS:
"{ElementProperty:{FormProperty:Var ParentFormID}.CONDITION.ValueWithCursor}".replace(String.fromCharCode(166), ":{JS:if ("{F:P_DB}"=="ora")"{F:ORA_COLUMN}";else"{F:PG_COLUMN}";}"+ String.fromCharCode(166))}$A507915690$,chr(13),''), null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'AGET', 'PROMPT', 'Y', 'RUS:Get column into formula;ENG:Get column into formula;', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'GET', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'GET', 'DEFINITION', null, '', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'GET', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ID', 'CAPTION', null, 'ID', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ID', 'DEFINITION', null, 'ora2pg_col.id', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ID', 'HINT', null, 'ID описания', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ID', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_COLUMN', 'CAPTION', 'Y', 'ENG:Ora column;RUS:Ora column;', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_COLUMN', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_COLUMN', 'DEFINITION', null, 'ora2pg_col.ora_column', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_COLUMN', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORACOLUMN_ID', 'CAPTION', null, 'id', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORACOLUMN_ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORACOLUMN_ID', 'DEFINITION', null, 'ora2pg_col.oracolumn_id', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORACOLUMN_ID', 'HINT', null, 'id', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORACOLUMN_ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORACOLUMN_ID', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_PK', 'CAPTION', null, 'pk', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_PK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_PK', 'DEFINITION', null, 'ora2pg_col.ora_pk', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_PK', 'HINT', null, 'pk', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_PK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_TYPE', 'CAPTION', null, 'Ora Datatype', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_TYPE', 'DEFINITION', null, 'ora2pg_col.ora_type', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_UK', 'CAPTION', null, 'uk', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_UK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_UK', 'DEFINITION', null, 'ora2pg_col.ora_uk', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'ORA_UK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'PG_COLUMN', 'CAPTION', null, 'Pg column', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'PG_COLUMN', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'PG_COLUMN', 'DEFINITION', null, 'ora2pg_col.pg_column', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', 'PG_COLUMN', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', null, 'HEADER', null, 'Columns', null),
('ORA2PGSYNCX', 'FORMULA_COLS_PG', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A313993917$(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_COL} ora2pg_col where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}
and exclude is null and pg_column is not null and ora_column is not null$A313993917$,chr(13),''), null);
Delete from lui_t_value where form_code='FORMULA_EVALEX_ITEMS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='FORMULA_EVALEX_ITEMS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='FORMULA_EVALEX_ITEMS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='FORMULA_EVALEX_ITEMS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'P_DDOT', 'PARAM', 'FORMULA_EVALEX_ITEMS', 'RUS::;ENG::;', null, 3),
('ORA2PGSYNCX', 'P_CATEGORY', 'PARAM', 'FORMULA_EVALEX_ITEMS', 'RUS:Category;ENG:Category;', null, 1),
('ORA2PGSYNCX', 'SUBCATEGORY', 'ITEM', 'FORMULA_EVALEX_ITEMS', 'RUS:subcategory;', null, 1),
('ORA2PGSYNCX', 'ITEM', 'ITEM', 'FORMULA_EVALEX_ITEMS', 'RUS:item;', null, 4),
('ORA2PGSYNCX', 'DESCRIPTION', 'ITEM', 'FORMULA_EVALEX_ITEMS', 'RUS:description;', null, 5),
('ORA2PGSYNCX', 'P_ENGINE', 'PARAM', 'FORMULA_EVALEX_ITEMS', 'RUS:Engine;ENG:Engine;', null, 2),
('ORA2PGSYNCX', 'ITEM_GET', 'ACTION', 'FORMULA_EVALEX_ITEMS', 'RUS:Get item into formula;ENG:Get item into formula;', 'ITEM', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'RUS:EvalEx items;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'DESCRIPTION', 'CAPTION', null, 'description', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'DESCRIPTION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'DESCRIPTION', 'DEFINITION', null, 'ora2pg_evalex_items.description', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'DESCRIPTION', 'HINT', null, 'description', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'DESCRIPTION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM', 'CAPTION', null, 'item', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM', 'DEFINITION', null, 'ora2pg_evalex_items.item', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM', 'HINT', null, 'item', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM', 'SORT', null, '2', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM_GET', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM_GET', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM_GET', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM_GET', 'PROC_FINALLY', null, 'Focus:{Property:Var ParentFormID}.CONDITION', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM_GET', 'PROC_INITIALLY', null, 'F:{FormProperty:Var ParentFormID}.CONDITION={JS:"{ElementProperty:{FormProperty:Var ParentFormID}.CONDITION.ValueWithCursor}".replace(String.fromCharCode(166), "{F:P_DDOT}{F:ITEM}"+ String.fromCharCode(166))}', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'ITEM_GET', 'PROMPT', 'Y', 'RUS:Get column into formula;ENG:Get column into formula;', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'SUBCATEGORY', 'CAPTION', null, 'subcategory', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'SUBCATEGORY', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'SUBCATEGORY', 'DEFINITION', null, 'ora2pg_evalex_items.subcategory', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'SUBCATEGORY', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'SUBCATEGORY', 'HINT', null, 'subcategory', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'SUBCATEGORY', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', 'SUBCATEGORY', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', null, 'HEADER', null, '{F:P_CATEGORY}s', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', null, 'LINE_FEED', null, 'WRAP', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A212977196$(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_EVALEX_ITEMS} ora2pg_evalex_items 
where category={F2SQL:P_CATEGORY} and (engine={F2SQL:P_ENGINE} or engine='ALL')$A212977196$,chr(13),''), null);
Delete from lui_t_value where form_code='FORMULA_EVALEX_ITEMS_U' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='FORMULA_EVALEX_ITEMS_U' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='FORMULA_EVALEX_ITEMS_U' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='FORMULA_EVALEX_ITEMS_U' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'P_DDOT', 'PARAM', 'FORMULA_EVALEX_ITEMS_U', 'RUS::;ENG::;', null, 1),
('ORA2PGSYNCX', 'ITEM', 'ITEM', 'FORMULA_EVALEX_ITEMS_U', 'RUS:item;', null, 5),
('ORA2PGSYNCX', 'DESCRIPTION', 'ITEM', 'FORMULA_EVALEX_ITEMS_U', 'RUS:description;', null, 6),
('ORA2PGSYNCX', 'QUERY', 'ITEM', 'FORMULA_EVALEX_ITEMS_U', 'RUS:query;', null, 7),
('ORA2PGSYNCX', 'ADD', 'ACTION', 'FORMULA_EVALEX_ITEMS_U', 'RUS:Add;ENG:Add;', null, 2),
('ORA2PGSYNCX', 'EDIT', 'ACTION', 'FORMULA_EVALEX_ITEMS_U', 'RUS:Edit;ENG:Edit;', null, 3),
('ORA2PGSYNCX', 'DEL', 'ACTION', 'FORMULA_EVALEX_ITEMS_U', 'RUS:Delete;ENG:Delete;', null, 4),
('ORA2PGSYNCX', 'ITEM_GET', 'ACTION', 'FORMULA_EVALEX_ITEMS_U', 'RUS:Get item into formula;ENG:Get item into formula;', 'ITEM', 1),
('ORA2PGSYNCX', 'EDIT_P_ITEM', 'PARAM', 'FORMULA_EVALEX_ITEMS_U', 'RUS:item;ENG:item;', 'EDIT', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'RUS:User-defned constants;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ADD', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ADD', 'COMMAND', null, 'FORMULA_EVALEX_UB', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ADD', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ADD', 'ICON', null, 'addrow', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ADD', 'PROMPT', 'Y', 'ENG:[ico:{Property:ICON}]Add;RUS:[ico:{Property:ICON}]Add;', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ADD', 'ROLE', null, 'ADD', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DEL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DEL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DEL', 'ICON', null, '{JS:if("{Property:ACTIVE}"=="EXIST" && 0{Property:Var CurrentRow}>0)"delrow";else "";}', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DEL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DEL', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)delete from {ApplicationProperty:ORA2PG_EVALEX_ITEMS_U} where item={F2SQL:ITEM}', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DEL', 'PROMPT', 'Y', 'ENG:[ico:{Property:ICON}]Delete;RUS:[ico:{Property:ICON}]Delete;', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DEL', 'ROLE', null, 'DELETE', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DESCRIPTION', 'CAPTION', null, 'description', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DESCRIPTION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DESCRIPTION', 'DEFINITION', null, 'ora2pg_evalex_items_u.description', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DESCRIPTION', 'HINT', null, 'description', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'DESCRIPTION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT', 'COMMAND', null, 'FORMULA_EVALEX_UB', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT', 'ICON', null, '{JS:if("{Property:ACTIVE}"=="EXIST" && 0{Property:Var CurrentRow}>0)"edit";else "";}', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT', 'PROMPT', 'Y', 'ENG:[ico:{Property:ICON}]Edit;RUS:[ico:{Property:ICON}]Edit;', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT_P_ITEM', 'NAME', null, 'P_ITEM', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'EDIT_P_ITEM', 'VALUE', null, '{F:ITEM}', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM', 'CAPTION', null, 'item', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM', 'DEFINITION', null, 'ora2pg_evalex_items_u.item', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM', 'HINT', null, 'item', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM_GET', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM_GET', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM_GET', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM_GET', 'PROC_FINALLY', null, 'Focus:{Property:Var ParentFormID}.CONDITION', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM_GET', 'PROC_INITIALLY', null, 'F:{FormProperty:Var ParentFormID}.CONDITION={JS:"{ElementProperty:{FormProperty:Var ParentFormID}.CONDITION.ValueWithCursor}".replace(String.fromCharCode(166), "{F:P_DDOT}{F:ITEM}"+ String.fromCharCode(166))}', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'ITEM_GET', 'PROMPT', 'Y', 'RUS:Get column into formula;ENG:Get column into formula;', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'QUERY', 'CAPTION', null, 'query', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'QUERY', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'QUERY', 'DEFINITION', null, 'ora2pg_evalex_items_u.query', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'QUERY', 'HINT', null, 'query', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', 'QUERY', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', null, 'HEADER', null, 'User-defned constants', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_ITEMS_U', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_EVALEX_ITEMS_U} ora2pg_evalex_items_u', null);
Delete from lui_t_value where form_code='FORMULA_EVALEX_UB' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='FORMULA_EVALEX_UB' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='FORMULA_EVALEX_UB' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='FORMULA_EVALEX_UB' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'CANCEL', 'ACTION', 'FORMULA_EVALEX_UB', 'ENG:Reject;RUS:Отказаться;', null, 900),
('ORA2PGSYNCX', 'P_ITEM', 'PARAM', 'FORMULA_EVALEX_UB', 'RUS:item;ENG:item;', null, 2),
('ORA2PGSYNCX', 'ITEM', 'ITEM', 'FORMULA_EVALEX_UB', 'RUS:item;', null, 1),
('ORA2PGSYNCX', 'DESCRIPTION', 'ITEM', 'FORMULA_EVALEX_UB', 'RUS:description;', null, 3),
('ORA2PGSYNCX', 'QUERY', 'ITEM', 'FORMULA_EVALEX_UB', 'RUS:query;', null, 4),
('ORA2PGSYNCX', 'OK', 'ACTION', 'FORMULA_EVALEX_UB', 'RUS:Save;ENG:Save;', null, 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'RUS:User-defined constant;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'CANCEL', 'AFTER', null, 'CANCEL', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'CANCEL', 'ICON', null, 'cancel', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'CANCEL', 'PROMPT', 'Y', 'ENG:Cancel;RUS:Отказаться;', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'CANCEL', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'DESCRIPTION', 'CAPTION', null, 'description', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'DESCRIPTION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'DESCRIPTION', 'HINT', null, 'description', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'DESCRIPTION', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'DESCRIPTION', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'ITEM', 'CAPTION', null, 'item', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'ITEM', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'ITEM', 'FORMAT', null, 'CODE32', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'ITEM', 'HINT', null, 'item', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'ITEM', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'ITEM', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'ITEM', 'VERIFIER', null, 'LUI_V_CODE32', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'OK', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'OK', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'OK', 'PROC_INITIALLY', null, replace($A214330151$PLPGSQL:(ORA2PGSYNCX)begin
 if {F2SQL:P_ITEM} is null then
  insert into {ApplicationProperty:ORA2PG_EVALEX_ITEMS_U} (item,description,query) values ({F2SQL:ITEM},{F2SQL:DESCRIPTION},{F2SQL:QUERY});
 else
  update {ApplicationProperty:ORA2PG_EVALEX_ITEMS_U} set item={F2SQL:ITEM},description={F2SQL:DESCRIPTION},query={F2SQL:QUERY}
  where item={F2SQL:P_ITEM};
 end if;
end;$A214330151$,chr(13),''), null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'OK', 'PROMPT', 'Y', 'RUS:Save;ENG:Save;', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'OK', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'QUERY', 'CAPTION', null, 'query', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'QUERY', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'QUERY', 'HINT', null, 'query', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'QUERY', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'QUERY', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', 'QUERY', 'VISIBLE', null, '5', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', null, 'HEADER', null, 'User-defined constant', null),
('ORA2PGSYNCX', 'FORMULA_EVALEX_UB', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_EVALEX_ITEMS_U} ora2pg_evalex_items_u  where item={F2SQL:P_ITEM}', null);
Delete from lui_t_value where form_code='LUI_L_PG_MUTUAL_LOCKS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='LUI_L_PG_MUTUAL_LOCKS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='LUI_L_PG_MUTUAL_LOCKS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='LUI_L_PG_MUTUAL_LOCKS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'PGTARGET_MONITORING', 'RUS:Pg target monitoring;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'LIST', 'PGTARGET_MONITORING', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'LOCKING', 'GROUP', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокирующий сеанс;ENG:Locking session;', null, 10),
('ORA2PGSYNCX', 'LOCKED', 'GROUP', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокируемый сеанс;ENG:Locked session;', null, 20),
('ORA2PGSYNCX', 'LOCKING_PID', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокирующий PID;ENG:Locking PID;', 'LOCKING', 10),
('ORA2PGSYNCX', 'LOCKING_ROOT', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Корень;ENG:Root;', 'LOCKING', 11),
('ORA2PGSYNCX', 'LOCKING_USER', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокирующий пользователь;ENG:Locking User;', 'LOCKING', 20),
('ORA2PGSYNCX', 'LOCKING_APP', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокирующее приложение;ENG:Locking application;', 'LOCKING', 30),
('ORA2PGSYNCX', 'LOCKING_QUERY', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокирующий оператор;ENG:Lockking statement;', 'LOCKING', 40),
('ORA2PGSYNCX', 'LOCKING_STATE', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Состояние блокирующего сеанса;ENG:Locking session state;', 'LOCKING', 50),
('ORA2PGSYNCX', 'LOCKING_ST_CHANGE', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокирует с;ENG:Locking from;', 'LOCKING', 60),
('ORA2PGSYNCX', 'LOCKED_STATE', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Состояние блокируемого сеанса;ENG:Locked session state;', 'LOCKED', 50),
('ORA2PGSYNCX', 'LOCKED_ST_CHANGE', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Заблокирован с;ENG:Locked start;', 'LOCKED', 60),
('ORA2PGSYNCX', 'LOCKED_PID', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокируемый PID;ENG:Locked PID;', 'LOCKED', 10),
('ORA2PGSYNCX', 'LOCKED_USER', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокируемый пользователь;ENG:Locked User;', 'LOCKED', 20),
('ORA2PGSYNCX', 'LOCKED_APP', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокируемое приложение;ENG:Locked Application;', 'LOCKED', 30),
('ORA2PGSYNCX', 'LOCKED_QUERY', 'ITEM', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Блокируемый оператор;ENG:Locked statement;', 'LOCKED', 40),
('ORA2PGSYNCX', 'LOCKING_KILL', 'ACTION', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Разорвать блокирующий сеанс;ENG:Kill locking session;', 'LOCKING_PID', 1),
('ORA2PGSYNCX', 'LOCKED_KILL', 'ACTION', 'LUI_L_PG_MUTUAL_LOCKS', 'RUS:Разорвать блокируемый сеанс;ENG:Kill locked session;', 'LOCKED_PID', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'RUS:Взаимные блокировки сеансов;ENG:Mutual session locks;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED', 'TITLE', 'Y', 'RUS:Блокируемый сеанс;ENG:Locked session;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_APP', 'CAPTION', 'Y', 'RUS:Приложение;ENG:Application;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_APP', 'DEFINITION', null, 'bda.application_name', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_APP', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_APP', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'APPLY_TO', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'EXPLANATION', 'Y', 'RUS:Принудительно завершить сеанс, который заблокирован другим (другими) сеансом(ами);ENG:Forcibly terminate the session that locked by other session(s);', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'ICON', null, 'delrow', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'PROC_FINALLY', null, 'SQL:commit', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'PROC_INITIALLY', null, 'SQL:select 1 from pg_terminate_backend({F:LOCKED_PID})', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'PROMPT', 'Y', 'RUS:Разорвать блокируемый сеанс;ENG:Kill locked session;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_KILL', 'QUESTION', 'Y', 'RUS:Сеанс {F:LOCKED_PID} пользователя {F:LOCKED_USER} будет разорван.;ENG:Kill session #{F:LOCKED_PID}  of user  {F:LOCKED_USER}?;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_PID', 'CAPTION', 'Y', 'RUS:PID;ENG:PID;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_PID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_PID', 'DEFINITION', null, 'bda.pid', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_PID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_PID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_PID', 'SORT', null, '2', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_PID', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_QUERY', 'CAPTION', 'Y', 'RUS:Оператор;ENG:Statement;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_QUERY', 'DEFINITION', null, 'bda.query', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_QUERY', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_QUERY', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_STATE', 'CAPTION', 'Y', 'RUS:Состояние сеанса;ENG:Session state;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_STATE', 'DEFINITION', null, 'bda.state', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_STATE', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_ST_CHANGE', 'CAPTION', 'Y', 'RUS:Блокирован с;ENG:Locking from;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_ST_CHANGE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_ST_CHANGE', 'DEFINITION', null, 'bda.state_change', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_ST_CHANGE', 'FORMAT', null, 'dd.mm.yyyy hh24:mi:ss.ms', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_ST_CHANGE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_ST_CHANGE', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_USER', 'CAPTION', 'Y', 'RUS:Пользователь;ENG:User;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_USER', 'DEFINITION', null, 'bda.usename', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_USER', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKED_USER', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING', 'TITLE', 'Y', 'RUS:Блокирующий сеанс;ENG:Locking session;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_APP', 'CAPTION', 'Y', 'RUS:Приложение;ENG:Application;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_APP', 'DEFINITION', null, 'bga.application_name', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_APP', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_APP', 'VISUALIZATION', null, '{JS: if ("{F:LOCKING_ROOT}"=="Y") "DANGER"; else "";}', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_APP', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'APPLY_TO', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'EXPLANATION', 'Y', 'RUS:Принудительно завершить сеанс, который блокирут другой (другие) сеанс(ы);ENG:Forcibly terminate the session that blocks other session(s);', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'ICON', null, 'delrow', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'PROC_FINALLY', null, 'SQL:commit', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'PROC_INITIALLY', null, 'SQL:select 1 from pg_terminate_backend({F:LOCKING_PID})', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'PROMPT', 'Y', 'RUS:Разорвать блокирующий сеанс;ENG:Kill locking session;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_KILL', 'QUESTION', 'Y', 'RUS:Сеанс {F:LOCKING_PID} пользователя {F:LOCKING_USER} будет разорван.;ENG:Kill session #{F:LOCKING_PID}  of user  {F:LOCKING_USER}?;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_PID', 'CAPTION', 'Y', 'RUS:PID;ENG:PID;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_PID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_PID', 'DEFINITION', null, 'bga.pid', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_PID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_PID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_PID', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_PID', 'VISUALIZATION', null, '{JS: if ("{F:LOCKING_ROOT}"=="Y") "DANGER";else "";}', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_PID', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_QUERY', 'CAPTION', 'Y', 'RUS:Оператор;ENG:Statement;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_QUERY', 'DEFINITION', null, 'bga.query', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_QUERY', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_QUERY', 'VISUALIZATION', null, '{JS: if ("{F:LOCKING_ROOT}"=="Y") "DANGER"; else "";}', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_QUERY', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ROOT', 'CAPTION', 'Y', 'RUS:Корень;ENG:Root;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ROOT', 'DEFINITION', null, replace($A309222693$(select
 case count(*) when 0 then 'Y' else 'N' end 
from pg_catalog.pg_locks bdl2
  join pg_stat_activity bda2
    on bda2.pid = bdl2.pid
  join pg_catalog.pg_locks bgl2
    on bgl2.pid != bdl2.pid
    and bgl2.transactionid = bdl2.transactionid
  join pg_stat_activity bga2
    on bga2.pid = bgl2.pid
where not bdl2.granted
and bda2.pid=bga.pid)$A309222693$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ROOT', 'HINT', 'Y', 'RUS:Является ли сеанс корнем дерева блокировок;ENG:Is a session the root of the lock tree;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ROOT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ROOT', 'VISUALIZATION', null, '{JS: if ("{F:LOCKING_ROOT}"=="Y") "DANGER"; else "";}', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ROOT', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_STATE', 'CAPTION', 'Y', 'RUS:Состояние сеанса;ENG:Session state;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_STATE', 'DEFINITION', null, 'bga.state', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_STATE', 'VISUALIZATION', null, '{JS: if ("{F:LOCKING_ROOT}"=="Y") "DANGER"; else "";}', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_STATE', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ST_CHANGE', 'CAPTION', 'Y', 'RUS:Блокирует с;ENG:Locking from;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ST_CHANGE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ST_CHANGE', 'DEFINITION', null, 'bga.state_change', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ST_CHANGE', 'FORMAT', null, 'dd.mm.yyyy hh24:mi:ss.ms', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ST_CHANGE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ST_CHANGE', 'VISUALIZATION', null, '{JS: if ("{F:LOCKING_ROOT}"=="Y") "DANGER"; else "";}', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_ST_CHANGE', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_USER', 'CAPTION', 'Y', 'RUS:Пользователь;ENG:User;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_USER', 'DEFINITION', null, 'bga.usename', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_USER', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_USER', 'VISUALIZATION', null, '{JS: if ("{F:LOCKING_ROOT}"=="Y") "DANGER"; else "";}', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', 'LOCKING_USER', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', null, 'HEADER', 'Y', 'ENG:Mutual session locks in target database;RUS:Блокирующие и блокируемые сеансы в целевой БД;', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', null, 'ON_LOAD', null, 'FormProperty:Connection={ApplicationProperty:Connection}', null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A414651386$(PGTARGET)select * from pg_catalog.pg_locks bdl
  join pg_stat_activity bda
    on bda.pid = bdl.pid
  join pg_catalog.pg_locks bgl
    on bgl.pid != bdl.pid
    and bgl.transactionid = bdl.transactionid
  join pg_stat_activity bga
    on bga.pid = bgl.pid
where not bdl.granted$A414651386$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_MUTUAL_LOCKS', 'DEFAULT', null, 'START_MODE', null, 'NONE', null);
Delete from lui_t_value where form_code='LUI_L_PG_PARAM' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='LUI_L_PG_PARAM' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='LUI_L_PG_PARAM' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='LUI_L_PG_PARAM' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'PGTARGET_MONITORING', 'RUS:Pg target monitoring;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'LIST', 'PGTARGET_MONITORING', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'NAME', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Название;ENG:Name;', null, 6),
('ORA2PGSYNCX', 'CATEGORY', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Группа ;ENG:Category;', null, 4),
('ORA2PGSYNCX', 'CONTEXT', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Контекст;ENG:Context;', null, 5),
('ORA2PGSYNCX', 'SETTING', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Текущее значение;ENG:Current value;', null, 7),
('ORA2PGSYNCX', 'SHORT_DESC', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Описание;ENG:Description;', null, 11),
('ORA2PGSYNCX', 'ENUMVALS', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Возможные значения;ENG:Possible values;', null, 14),
('ORA2PGSYNCX', 'SETTING_EDIT', 'ACTION', 'LUI_L_PG_PARAM', 'RUS:Изменить;ENG:Edit;', null, 2),
('ORA2PGSYNCX', 'EXTRA_DESC', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Дополнительное описание;ENG:Extra desc;', null, 13),
('ORA2PGSYNCX', 'VARTYPE', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Тип данных;ENG:Data type;', null, 12),
('ORA2PGSYNCX', 'RESET_VAL', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:По умолчанию;ENG:Default value;', null, 9),
('ORA2PGSYNCX', 'BOOT_VAL', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:При загрузке;ENG:Boot value;', null, 10),
('ORA2PGSYNCX', 'SOURCE', 'ITEM', 'LUI_L_PG_PARAM', 'RUS:Источник;ENG:Source;', null, 8),
('ORA2PGSYNCX', 'SET2DEF', 'ACTION', 'LUI_L_PG_PARAM', 'RUS:Восстановить умолчание;ENG:Set to DEFAULT;', null, 3),
('ORA2PGSYNCX', 'SE_P_NAME', 'PARAM', 'LUI_L_PG_PARAM', 'RUS:Название параметра;ENG:Par.name;', 'SETTING_EDIT', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'RUS:Параметры БД;ENG:DBMS parameters;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'BOOT_VAL', 'CAPTION', 'Y', 'RUS:При загрузке;ENG:Boot value;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'BOOT_VAL', 'DEFINITION', null, 'boot_val', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'BOOT_VAL', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CATEGORY', 'CAPTION', 'Y', 'RUS:Группа ;ENG:Category;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CATEGORY', 'DEFINITION', null, 'category', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CATEGORY', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CATEGORY', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CATEGORY', 'VARIANTS', null, 'select distinct category from pg_settings order by 1', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CONTEXT', 'CAPTION', 'Y', 'RUS:Контекст;ENG:Context;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CONTEXT', 'DEFINITION', null, 'context', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CONTEXT', 'HINT', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CONTEXT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'CONTEXT', 'VARIANTS', null, 'LOVD:internal:Менять нельзя;postmaster:При запуске;sighup:pg_reload_conf();superuser-backend:При соединении суперпользователя;backend:При соединении;superuser:В теч.сеанса суперпользователя;user:В теч.сеанса;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'ENUMVALS', 'CAPTION', 'Y', 'RUS:Возможные значения;ENG:Possible values;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'ENUMVALS', 'DEFINITION', null, 'enumvals', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'ENUMVALS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'ENUMVALS', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'EXTRA_DESC', 'CAPTION', 'Y', 'RUS:Дополнительное описание;ENG:Extra desc;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'EXTRA_DESC', 'DEFINITION', null, 'extra_desc', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'EXTRA_DESC', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'EXTRA_DESC', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'NAME', 'CAPTION', 'Y', 'RUS:Название;ENG:Name;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'NAME', 'DEFINITION', null, 'name', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'NAME', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'RESET_VAL', 'CAPTION', 'Y', 'RUS:По умолчанию;ENG:Default value;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'RESET_VAL', 'DEFINITION', null, 'reset_val', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'RESET_VAL', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SE_P_NAME', 'NAME', null, 'P_NAME', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SE_P_NAME', 'VALUE', null, '{F:NAME}', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SET2DEF', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SET2DEF', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SET2DEF', 'ICON', null, 'undo', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SET2DEF', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SET2DEF', 'PROC_FINALLY', null, 'SQL:Commit', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SET2DEF', 'PROC_INITIALLY', null, 'SQL:SET {F:NAME} TO DEFAULT', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SET2DEF', 'PROMPT', 'Y', 'RUS:[ico:undo]Восстановить умолчание;ENG:[ico:undo]Set to DEFAULT;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SET2DEF', 'QUESTION', 'Y', 'RUS:{JS: if ("{FormProperty:SelectionMode}"=="Multi") "Количество параметров для восстановления значения по умолчанию = {Property:CountSelected}"#$ else "Установить умолчание для {F:NAME}?"#$};ENG:{JS: if ("{FormProperty:SelectionMode}"=="Multi") "Set default value for {Property:CountSelected} parameters?"#$ else "Set default value for {F:NAME}?"#$};', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING', 'CAPTION', 'Y', 'RUS:Текущее значение;ENG:Current value;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING', 'DEFINITION', null, replace($A50766525$setting || case when unit is null then '' else ' [' || unit || ']' end$A50766525$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING', 'HINT', null, 'Значение для текущего сеанса', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING_EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING_EDIT', 'COMMAND', null, 'LUI_B_PG_PARAM', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING_EDIT', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING_EDIT', 'EXPLANATION', 'Y', 'RUS:Изменить значение параметра для текущего сеанса;ENG:Change value for current session;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING_EDIT', 'ICON', null, 'edit', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING_EDIT', 'PROMPT', 'Y', 'RUS:[ico:edit]Изменить;ENG:[ico:edit]Edit;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SETTING_EDIT', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SHORT_DESC', 'CAPTION', 'Y', 'RUS:Описание;ENG:Description;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SHORT_DESC', 'DEFINITION', null, 'short_desc', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SHORT_DESC', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SHORT_DESC', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SOURCE', 'CAPTION', 'Y', 'RUS:Источник;ENG:Source;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SOURCE', 'DEFINITION', null, 'source', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SOURCE', 'HINT', 'Y', 'RUS:Источник текущего значения;ENG:Current value source;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SOURCE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'SOURCE', 'VARIANTS', null, 'select distinct source from pg_settings order by 1', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'VARTYPE', 'CAPTION', 'Y', 'RUS:Тип данных;ENG:Data type;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'VARTYPE', 'DEFINITION', null, 'vartype', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'VARTYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'VARTYPE', 'VARIANTS', null, 'select distinct vartype source from pg_settings order by 1', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', 'VARTYPE', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', null, 'ADD_INFO', null, replace($A81183124${F:SHORT_DESC}
{F:EXTRA_DESC}$A81183124$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', null, 'HEADER', 'Y', 'ENG:Target database parameters;RUS:Параметры целевой БД;', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', null, 'ON_LOAD', null, 'FormProperty:Connection={ApplicationProperty:Connection}', null),
('ORA2PGSYNCX', 'LUI_L_PG_PARAM', 'DEFAULT', null, 'QUERY_TEXT', null, '(PGTARGET)select * from pg_settings', null);
Delete from lui_t_value where form_code='LUI_L_PG_SESSION' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='LUI_L_PG_SESSION' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='LUI_L_PG_SESSION' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='LUI_L_PG_SESSION' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'PGTARGET_MONITORING', 'RUS:Pg target monitoring;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'LIST', 'PGTARGET_MONITORING', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'PID_KILL', 'ACTION', 'LUI_L_PG_SESSION', 'RUS:Разорвать сеанс;ENG:Kill session;', null, 1),
('ORA2PGSYNCX', 'FIX', 'GROUP', 'LUI_L_PG_SESSION', 'RUS:Fixed;ENG:Fixed;', null, 10),
('ORA2PGSYNCX', 'USERNAME', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:Пользователь;ENG:Username;', null, 20),
('ORA2PGSYNCX', 'SYSMENU$EXECUTEQUERY', 'ACTION', 'LUI_L_PG_SESSION', 'RUS:Выполнение запроса;', null, 200),
('ORA2PGSYNCX', 'SYSMENU$ROWCOUNT', 'ACTION', 'LUI_L_PG_SESSION', 'RUS:Количество строк;', null, 201),
('ORA2PGSYNCX', 'BACKEND_START', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:Дата и время начала сеанса;ENG:Start datetime;', null, 50),
('ORA2PGSYNCX', 'STATE', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:Состояние;ENG:State;', null, 60),
('ORA2PGSYNCX', 'CLIENT_HOSTNAME', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:Имя хоста;ENG:Hostname;', null, 40),
('ORA2PGSYNCX', 'APPLICATION_NAME', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:Информация о приложении;ENG:Application info;', null, 80),
('ORA2PGSYNCX', 'CLIENT_ADDR', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:IP-адрес;ENG:IP address;', null, 30),
('ORA2PGSYNCX', 'CURRENT_USER', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:CURRENT_USER;ENG:CURRENT_USER;', null, 90),
('ORA2PGSYNCX', 'SESSION_USER', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:SESSION_USER;ENG:SESSION_USER;', null, 82),
('ORA2PGSYNCX', 'IS_CHANGES', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:Несохранённые изменения;ENG:Unsaved changes;', null, 81),
('ORA2PGSYNCX', 'STATE_CHANGE', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:state_change;', null, 70),
('ORA2PGSYNCX', 'OVERFLOW', 'GROUP', 'LUI_L_PG_SESSION', 'RUS:Справа;ENG:Rightpanel;', null, 104),
('ORA2PGSYNCX', 'WAIT_EVENT', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:wait_event;', null, 103),
('ORA2PGSYNCX', 'WAIT_EVENT_TYPE', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:wait_event_type;', null, 101),
('ORA2PGSYNCX', 'DATNAME', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:Имя БД;ENG:Database;', 'FIX', 10),
('ORA2PGSYNCX', 'PID', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:ID сеанса;ENG:Session ID;', 'FIX', 90),
('ORA2PGSYNCX', 'QUERY', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:SQL оператор;ENG:SQL statement;', 'OVERFLOW', 102),
('ORA2PGSYNCX', 'QUERY_START', 'ITEM', 'LUI_L_PG_SESSION', 'RUS:query_start;', 'OVERFLOW', 100);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'RUS:Сеансы в БД;ENG:Сеансы в БД;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'APPLICATION_NAME', 'CAPTION', 'Y', 'RUS:Информация о приложении;ENG:Application info;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'APPLICATION_NAME', 'DEFINITION', null, 's.application_name', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'APPLICATION_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'APPLICATION_NAME', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'BACKEND_START', 'CAPTION', 'Y', 'RUS:Дата и время начала сеанса;ENG:Start datetime;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'BACKEND_START', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'BACKEND_START', 'DEFINITION', null, 's.backend_start', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'BACKEND_START', 'FORMAT', null, 'dd.mm.yyyy hh24:mi:ss.ms', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'BACKEND_START', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'BACKEND_START', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_ADDR', 'CAPTION', 'Y', 'RUS:IP-адрес;ENG:IP address;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_ADDR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_ADDR', 'DEFINITION', null, 's.client_addr::text', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_ADDR', 'GETUP', null, 'NORMAL GRAY NORMAL DANGER', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_ADDR', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_ADDR', 'MAKEUP', null, replace($A605009138$/\/(\d+)|(\d+)|(\W)/g$A605009138$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_ADDR', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_HOSTNAME', 'CAPTION', 'Y', 'RUS:Имя хоста;ENG:Hostname;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_HOSTNAME', 'DEFINITION', null, 's.client_hostname', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_HOSTNAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CLIENT_HOSTNAME', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CURRENT_USER', 'CAPTION', 'Y', 'RUS:CURRENT_USER;ENG:CURRENT_USER;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CURRENT_USER', 'DEFINITION', null, 'current_user', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'CURRENT_USER', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'DATNAME', 'CAPTION', 'Y', 'RUS:Имя БД;ENG:Database;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'DATNAME', 'DEFINITION', null, 's.datname', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'DATNAME', 'FOR_UNIQUE_KEY', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'DATNAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'DATNAME', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'FIX', 'GROUP_TYPE', null, 'FIXED', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'IS_CHANGES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'IS_CHANGES', 'CAPTION', 'Y', 'RUS:Несохранённые изменения;ENG:Unsaved changes;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'IS_CHANGES', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'IS_CHANGES', 'DEFINITION', null, '(select  count(*) from pg_catalog.pg_locks lo where lo.transactionid is not null and lo.pid =s.pid)', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'IS_CHANGES', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'IS_CHANGES', 'TOTAL', null, 'SUM("IS_CHANGES")', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'IS_CHANGES', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'OVERFLOW', 'GROUP_TYPE', null, 'OVERFLOW', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'OVERFLOW', 'TITLE', null, 'SQL-statement', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID', 'CAPTION', 'Y', 'RUS:ID сеанса;ENG:Session ID;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID', 'DEFINITION', null, 's.pid', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'EXPLANATION', 'Y', 'RUS:Принудительно завершить сеанс.;ENG:Forcibly terminate the session.;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'ICON', null, 'delrow', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'PROC_FINALLY', null, 'SQL:commit', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'PROC_INITIALLY', null, 'SQL:select 1 from pg_terminate_backend({F:PID})', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'PROMPT', 'Y', 'RUS:Разорвать сеанс;ENG:Kill session;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'QUESTION', null, replace($A835710400${JS: if ("{Property:SelectionMode}"=="Single" || "{Property:SelectionMode}"=="None") "Сеанс {F:PID} пользователя {F:USERNAME} будет завершён.";
else "Количество принудительно завершаемых сеансов = {Property:CountSelected}.";}$A835710400$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'PID_KILL', 'ROLE', null, 'DELETE', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY', 'CAPTION', 'Y', 'RUS:SQL оператор;ENG:SQL statement;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY', 'DEFINITION', null, 's.query', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY_START', 'CAPTION', null, 'query_start', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY_START', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY_START', 'DEFINITION', null, 's.query_start', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY_START', 'HINT', null, 'query_start', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'QUERY_START', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SESSION_USER', 'CAPTION', 'Y', 'RUS:SESSION_USER;ENG:SESSION_USER;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SESSION_USER', 'DEFINITION', null, 'session_user', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SESSION_USER', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE', 'CAPTION', 'Y', 'RUS:Состояние;ENG:State;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE', 'DEFINITION', null, 's.state', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE_CHANGE', 'CAPTION', null, 'state_change', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE_CHANGE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE_CHANGE', 'DEFINITION', null, 's.state_change', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE_CHANGE', 'HINT', null, 'state_change', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'STATE_CHANGE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'EXPLANATION', 'Y', 'RUS:Выполнение запроса;ENG:Execute query;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'ICON', null, 'refresh', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'PROC_INITIALLY', null, 'SQL:commit', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'PROMPT', 'Y', 'RUS:[ico:{Property:ICON}]Выполнение запроса;ENG:[ico:{Property:ICON}]Execute query;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'ROLE', null, 'EXECUTEQUERY', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$ROWCOUNT', 'ACTIVE', null, replace($A827953323${JS: if ('{Property:Var Is_QBE_Mode}'!='Y')'Y';}$A827953323$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$ROWCOUNT', 'EXPLANATION', 'Y', 'RUS:Подсчитать количество строк;ENG:To count the number of rows;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$ROWCOUNT', 'ICON', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$ROWCOUNT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$ROWCOUNT', 'PROC_INITIALLY', null, replace($A106245623$SQL:commit
$A106245623$||$A106245623$
ShowMessage:LUI-00032;P1:{SQL:select count(*) from ({Property:Var MainQuery})qqq};$A106245623$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'SYSMENU$ROWCOUNT', 'PROMPT', 'Y', 'RUS:[ico:lines_col]Количество строк;ENG:[ico:lines_col]Number of rows;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'USERNAME', 'CAPTION', 'Y', 'RUS:Пользователь;ENG:Username;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'USERNAME', 'DEFINITION', null, 's.usename', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'USERNAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'USERNAME', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT', 'CAPTION', null, 'Имя ожидания', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT', 'DEFINITION', null, 's.wait_event', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT', 'HINT', null, 'wait_event', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT_TYPE', 'CAPTION', null, 'Тип ожидания', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT_TYPE', 'DEFINITION', null, 's.wait_event_type', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT_TYPE', 'HINT', null, 'wait_event_type', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', 'WAIT_EVENT_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', null, 'ACTION_BEFORE_QUERY', null, 'SQL:commit;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', null, 'HEADER', 'Y', 'ENG:Target database sessions;RUS:Сеансы в целевой БД;', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', null, 'ON_LOAD', null, 'FormProperty:Connection={ApplicationProperty:Connection}', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', null, 'QUERY_TEXT', null, '(PGTARGET)select * from pg_stat_activity s', null),
('ORA2PGSYNCX', 'LUI_L_PG_SESSION', 'DEFAULT', null, 'START_MODE', null, 'SINGLE_ROW', null);
Delete from lui_t_value where form_code='LUI_L_PG_STAT_DATABASE' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='LUI_L_PG_STAT_DATABASE' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='LUI_L_PG_STAT_DATABASE' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='LUI_L_PG_STAT_DATABASE' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'PGTARGET_MONITORING', 'RUS:Pg target monitoring;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'LIST', 'PGTARGET_MONITORING', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'TUP_FETCHED', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:tup_fetched;', null, 7),
('ORA2PGSYNCX', 'XACT_ROLLBACK', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:xact_rollback;', null, 6),
('ORA2PGSYNCX', 'XACT_COMMIT', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:xact_commit;', null, 5),
('ORA2PGSYNCX', 'DATNAME', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:datname;', null, 4),
('ORA2PGSYNCX', 'TUP_UPDATED', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:tup_updated;', null, 10),
('ORA2PGSYNCX', 'TUP_INSERTED', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:tup_inserted;', null, 9),
('ORA2PGSYNCX', 'TUP_DELETED', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:tup_deleted;', null, 8),
('ORA2PGSYNCX', 'DATID', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:datid;', null, 3),
('ORA2PGSYNCX', 'REQ', 'ACTION', 'LUI_L_PG_STAT_DATABASE', 'RUS:Перезапрос;ENG:Requery;', null, 1),
('ORA2PGSYNCX', 'EXIT', 'ACTION', 'LUI_L_PG_STAT_DATABASE', 'RUS:Действие при закрытии;ENG:Action when closing;', null, 2),
('ORA2PGSYNCX', 'NUMBACKENDS', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:Процессов;ENG:Backends;', null, 11),
('ORA2PGSYNCX', 'LOWAIT', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:Ожидают блокировку;ENG:Waiting for lock;', null, 12),
('ORA2PGSYNCX', 'BLK_WRITE_TIME', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:blk_write_time;', null, 17),
('ORA2PGSYNCX', 'BLK_READ_TIME', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:blk_read_time;', null, 16),
('ORA2PGSYNCX', 'DEADLOCKS', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:Взаимных блокировок;ENG:Deadlocks;', null, 14),
('ORA2PGSYNCX', 'IOWAIT', 'ITEM', 'LUI_L_PG_STAT_DATABASE', 'RUS:Ожидают в/в;ENG:Waiting I/O;', null, 13);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'RUS:Статистика БД;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_READ_TIME', 'CAPTION', 'Y', 'RUS:Время чтения;ENG:Read time;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_READ_TIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_READ_TIME', 'DEFINITION', null, 's.blk_read_time', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_READ_TIME', 'HINT', 'Y', 'RUS:Время, затраченное серверными процессами в базе данных, на чтение блоков из файлов данных, в миллисекундах;ENG:Time spent reading data file blocks by backends in this database, in milliseconds;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_READ_TIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_READ_TIME', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_READ_TIME', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_READ_TIME', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_WRITE_TIME', 'CAPTION', 'Y', 'RUS:Время записи;ENG:Write time;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_WRITE_TIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_WRITE_TIME', 'DEFINITION', null, 's.blk_write_time', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_WRITE_TIME', 'HINT', 'Y', 'RUS:Время, затраченное серверными процессами в этой базе данных, на запись блоков в файлы данных, в миллисекундах;ENG:Time spent writing data file blocks by backends in this database, in milliseconds;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_WRITE_TIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_WRITE_TIME', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_WRITE_TIME', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'BLK_WRITE_TIME', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATID', 'CAPTION', 'Y', 'RUS:ID БД (datid);ENG:DB id (datid);', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATID', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATID', 'DEFINITION', null, 's.datid', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATID', 'HINT', 'Y', 'RUS:ID базы данных;ENG:Database ID;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATID', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATNAME', 'CAPTION', 'Y', 'RUS:Имя БД;ENG:DB name;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATNAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATNAME', 'DEFINITION', null, 's.datname', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATNAME', 'HINT', 'Y', 'RUS:Имя базы данных;ENG:Database name;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DATNAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DEADLOCKS', 'CAPTION', 'Y', 'RUS:Взаимных блокировок;ENG:Deadlocks;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DEADLOCKS', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DEADLOCKS', 'DEFINITION', null, 'deadlocks', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DEADLOCKS', 'HINT', 'Y', 'RUS:Количество взаимных блокировок, зафиксированное в базе данных;ENG:Number of deadlocks detected in this database;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DEADLOCKS', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DEADLOCKS', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'DEADLOCKS', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'EXIT', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'EXIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'EXIT', 'EXPLANATION', 'Y', 'RUS:Действие при закрытии;ENG:Action when closing;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'EXIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'EXIT', 'PROMPT', 'Y', 'RUS:Действие при закрытии;ENG:Action when closing;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'EXIT', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'IOWAIT', 'CAPTION', 'Y', 'RUS:Ожидают В/В;ENG:Waiting I/O;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'IOWAIT', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'IOWAIT', 'DEFINITION', null, replace($A23777272$(select count(*) from pg_stat_activity a where a.datid=s.datid and
wait_event_type in ('IO'))$A23777272$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'IOWAIT', 'HINT', 'Y', 'RUS:Количество сеансов ожидающих ввод/вывод;ENG:Number of sessions waiting for I/O;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'IOWAIT', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'IOWAIT', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'IOWAIT', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'LOWAIT', 'CAPTION', 'Y', 'RUS:Ожидают блокировку;ENG:Waiting for lock;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'LOWAIT', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'LOWAIT', 'DEFINITION', null, replace($A179526776$(select count(*) from pg_stat_activity a where a.datid=s.datid and
wait_event_type in ('LWLock','Lock','BufferPin'))$A179526776$,chr(13),''), null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'LOWAIT', 'HINT', 'Y', 'RUS:Количество сеансов ожидающих блокировку;ENG:Number of sessions waiting for lock;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'LOWAIT', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'LOWAIT', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'LOWAIT', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'NUMBACKENDS', 'CAPTION', 'Y', 'RUS:Процессов;ENG:Backends;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'NUMBACKENDS', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'NUMBACKENDS', 'DEFINITION', null, 's.numbackends', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'NUMBACKENDS', 'HINT', 'Y', 'RUS:Количество обслуживающих процессов, в настоящее время подключённых к базе данных;ENG:Number of backends currently connected to this database;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'NUMBACKENDS', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'REQ', 'ACTIVE', null, 'Y', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'REQ', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'REQ', 'EXPLANATION', 'Y', 'RUS:Перезапрос;ENG:Requery;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'REQ', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'REQ', 'PROC_FINALLY', null, 'SQL:commit', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'REQ', 'PROMPT', 'Y', 'RUS:Перезапрос;ENG:Requery;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'REQ', 'ROLE', null, 'TIME', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_DELETED', 'CAPTION', null, 'Deleted', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_DELETED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_DELETED', 'DEFINITION', null, 's.tup_deleted', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_DELETED', 'HINT', 'Y', 'RUS:Количество строк, удалённое запросами в базе данных;ENG:Number of rows deleted by queries in this database;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_DELETED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_DELETED', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_DELETED', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_FETCHED', 'CAPTION', null, 'Fetched', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_FETCHED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_FETCHED', 'DEFINITION', null, 's.tup_fetched', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_FETCHED', 'HINT', 'Y', 'RUS:Количество строк, извлечённое запросами в базе данных;ENG:Number of rows fetched by queries in this database;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_FETCHED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_FETCHED', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_FETCHED', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_INSERTED', 'CAPTION', null, 'Inserted', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_INSERTED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_INSERTED', 'DEFINITION', null, 's.tup_inserted', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_INSERTED', 'HINT', 'Y', 'RUS:Количество строк, вставленное запросами в этой базе данных;ENG:Number of rows inserted by queries in this database;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_INSERTED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_INSERTED', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_INSERTED', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_UPDATED', 'CAPTION', null, 'Updated', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_UPDATED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_UPDATED', 'DEFINITION', null, 's.tup_updated', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_UPDATED', 'HINT', 'Y', 'RUS:Количество строк, изменённое запросами в базе данных;ENG:Number of rows updated by queries in this database;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_UPDATED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_UPDATED', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'TUP_UPDATED', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_COMMIT', 'CAPTION', 'Y', 'RUS:Commit;ENG:Commit;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_COMMIT', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_COMMIT', 'DEFINITION', null, 's.xact_commit', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_COMMIT', 'HINT', 'Y', 'RUS:Количество commit;ENG:Commit count;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_COMMIT', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_COMMIT', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_COMMIT', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_ROLLBACK', 'CAPTION', null, 'Rollback', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_ROLLBACK', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_ROLLBACK', 'DEFINITION', null, 's.xact_rollback', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_ROLLBACK', 'HINT', 'Y', 'RUS:Количество rollback;ENG:Rollback count;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_ROLLBACK', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_ROLLBACK', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', 'XACT_ROLLBACK', 'VISUALIZATION', null, '', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', null, 'HEADER', 'Y', 'RUS:Статистика БД;ENG:DB statistics;', null),
('ORA2PGSYNCX', 'LUI_L_PG_STAT_DATABASE', 'DEFAULT', null, 'QUERY_TEXT', null, '(PGTARGET)select * from pg_stat_database s', null);
Delete from lui_t_value where form_code='O2P_B_PROC_PAR' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='O2P_B_PROC_PAR' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='O2P_B_PROC_PAR' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='O2P_B_PROC_PAR' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'CANCEL', 'ACTION', 'O2P_B_PROC_PAR', 'ENG:Reject;RUS:Отказаться;', null, 900),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'O2P_B_PROC_PAR', 'xout', null, 3),
('ORA2PGSYNCX', 'ARCLOGDELETE', 'ITEM', 'O2P_B_PROC_PAR', 'ArcLogDelete', null, 1),
('ORA2PGSYNCX', 'DEBUG', 'ITEM', 'O2P_B_PROC_PAR', 'Debug', null, 2);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'Parameters', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'ARCLOGDELETE', 'CAPTION', 'N', 'ArcLogDelete', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'ARCLOGDELETE', 'CHANGING', null, 'B', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'ARCLOGDELETE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'ARCLOGDELETE', 'HINT', null, 'ArcLogDelete', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'ARCLOGDELETE', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'ARCLOGDELETE', 'VARIANTS', null, 'Y:Yes;N:No;', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'CANCEL', 'AFTER', null, 'CANCEL', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'CANCEL', 'ICON', null, 'cancel', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'CANCEL', 'PROMPT', 'Y', 'ENG:Cancel;RUS:Отказаться;', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'CANCEL', 'QUESTION', 'Y', 'ENG:{JS:"{FormProperty:Var Changed}"==="Y"?"All changes will be lost! Close without saving?":""};RUS:{JS:"{FormProperty:Var Changed}"==="Y"?"Все изменения будут потеряны! Закрыть форму без сохранения?":""};', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'CANCEL', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'DEBUG', 'CAPTION', null, 'Debug', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'DEBUG', 'CHANGING', null, 'B', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'DEBUG', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'DEBUG', 'HINT', null, 'ArcLogDelete', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'DEBUG', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', 'DEBUG', 'VARIANTS', null, 'Y:Yes;N:No;', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', null, 'HEADER', null, 'Parameters', null),
('ORA2PGSYNCX', 'O2P_B_PROC_PAR', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A909059987$select 
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='ArclogDelete') "ARCLOGDELETE",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='Debug') "DEBUG",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='DebugBySteps') "DEBUGBYSTEPS",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='OptimizeSelfUpdate') "OPTIMIZESELFUPDATE",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='MaxBatchBytes') "MAXBATCHBYTES",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='MaxBatchDMLs') "MAXBATCHDMLS",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='MaxTxBytes') "MAXTXBYTES",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='MaxTxDMLs') "MAXTXDMLS",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='MaxTxMsec') "MAXTXMSEC",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='ThrottleMemPct') "THROTTLEMEMPCT",
(select param_value from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_code='NotThrottleMemPct') "NOTTHROTTLEMEMPCT"
$A909059987$,chr(13),''), null);
Delete from lui_t_value where form_code='OLR_METRICS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='OLR_METRICS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='OLR_METRICS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='OLR_METRICS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'OLR_METRICS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'INSTANCE_ID', 'ITEM', 'OLR_METRICS', 'RUS:instance_id;', null, 1),
('ORA2PGSYNCX', 'METRIC_NAME', 'ITEM', 'OLR_METRICS', 'RUS:metric_name;', null, 2),
('ORA2PGSYNCX', 'METRIC_VALUE', 'ITEM', 'OLR_METRICS', 'RUS:metric_value;', null, 3),
('ORA2PGSYNCX', 'UNIT', 'ITEM', 'OLR_METRICS', 'RUS:unit;', null, 4);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'RUS:OLR metrics;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'INSTANCE_ID', 'CAPTION', null, 'instance_id', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'INSTANCE_ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'INSTANCE_ID', 'DEFINITION', null, 'olr_metrics.instance_id', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'INSTANCE_ID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'INSTANCE_ID', 'HINT', null, 'instance_id', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'INSTANCE_ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_NAME', 'CAPTION', null, 'metric_name', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_NAME', 'DEFINITION', null, 'olr_metrics.metric_name', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_NAME', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_NAME', 'HINT', null, 'metric_name', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_NAME', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_VALUE', 'CAPTION', null, 'metric_value', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_VALUE', 'DEFINITION', null, 'olr_metrics.metric_value', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_VALUE', 'HINT', null, 'metric_value', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'METRIC_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'UNIT', 'CAPTION', null, 'unit', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'UNIT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'UNIT', 'DEFINITION', null, 'olr_metrics.unit', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'UNIT', 'HINT', null, 'unit', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', 'UNIT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', null, 'HEADER', null, 'OLR metrics', null),
('ORA2PGSYNCX', 'OLR_METRICS', 'DEFAULT', null, 'QUERY_TEXT', null, 'select * from {ApplicationProperty:OLR_METRICS} olr_metrics', null);
Delete from lui_t_value where form_code='ORA2PGSYNCX_B_LOGON' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='ORA2PGSYNCX_B_LOGON' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='ORA2PGSYNCX_B_LOGON' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='ORA2PGSYNCX_B_LOGON' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'MAINTAIN_SCHEMA', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Schema;ENG:Schema;', null, 60),
('ORA2PGSYNCX', 'USERNAMEX', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:UsernameX;ENG:UsernameX;', null, 56),
('ORA2PGSYNCX', 'PASSWORDX', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:passwordX;ENG:passwordX;', null, 57),
('ORA2PGSYNCX', 'URLX', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:URLx;ENG:URLx;', null, 58),
('ORA2PGSYNCX', 'SCHEMAX', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:SchemaX;ENG:SchemaX;', null, 59),
('ORA2PGSYNCX', 'URL', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:dbURL;ENG:dbURL;', null, 30),
('ORA2PGSYNCX', 'SCHEMA', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Схема;ENG:Schema;', null, 40),
('ORA2PGSYNCX', 'SQL_AFTER_LOGON', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:SQL после входа;ENG:SQL statement after logon;', null, 50),
('ORA2PGSYNCX', 'SYSMENU$CHOOSELANGUAGE', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:Изменить язык;', null, 900),
('ORA2PGSYNCX', 'OK', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:Logon;', null, 902),
('ORA2PGSYNCX', 'WINHEIGHT$', 'PARAM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Высота окна;ENG:Window height;', null, 30),
('ORA2PGSYNCX', 'POSITION$', 'PARAM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Положение на экране;ENG:Position;', null, 32),
('ORA2PGSYNCX', 'WINDOW_TYPE$', 'PARAM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Тип окна;ENG:Window type;', null, 33),
('ORA2PGSYNCX', 'SYSMENU$ABOUT', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 915),
('ORA2PGSYNCX', 'SYSMENU$HELP', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 914),
('ORA2PGSYNCX', 'SYSMENU$GETTRACEINFO', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 913),
('ORA2PGSYNCX', 'SYSMENU$GETSTAT', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 912),
('ORA2PGSYNCX', 'SYSMENU$DEBUGOFF', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 911),
('ORA2PGSYNCX', 'SYSMENU$DEBUGON', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 910),
('ORA2PGSYNCX', 'SYSMENU$CALCULATOR', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 909),
('ORA2PGSYNCX', 'SYSMENU$FULLPATH', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 908),
('ORA2PGSYNCX', 'USERNAME', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Username;', null, 10),
('ORA2PGSYNCX', 'WINWIDTH$', 'PARAM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Ширина окна;ENG:Window width;', null, 21),
('ORA2PGSYNCX', 'PASSWORD', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Password;', null, 20),
('ORA2PGSYNCX', 'SYSMENU$CLEARVISUAL', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:-;ENG:-;', null, 907),
('ORA2PGSYNCX', 'CANCEL', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'ENG:Cancel;RUS:Отказаться;', null, 906),
('ORA2PGSYNCX', 'CALL_NEXT_FORM', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:Показать меню;ENG:Show Menu;', null, 904),
('ORA2PGSYNCX', 'USERNAMET', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'UsernameT', null, 51),
('ORA2PGSYNCX', 'PASSWORDT', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'PasswordT', null, 52),
('ORA2PGSYNCX', 'URLT', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'UrlT', null, 53),
('ORA2PGSYNCX', 'SCHEMAT', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'SchemaT', null, 54),
('ORA2PGSYNCX', 'SQL_AFTER_LOGONT', 'ITEM', 'ORA2PGSYNCX_B_LOGON', 'SQL after logon T', null, 55),
('ORA2PGSYNCX', 'P_P_VIE2', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:Сделать видимым;ENG:Make it visible;', 'PASSWORDX', 1),
('ORA2PGSYNCX', 'OK_APPCODE', 'PARAM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Код приложения;ENG:Application Code;', 'OK', 1),
('ORA2PGSYNCX', 'P_P_VIEW', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:Сделать видимым;ENG:Make it visible;', 'PASSWORD', 1),
('ORA2PGSYNCX', 'SM_APPCODE', 'PARAM', 'ORA2PGSYNCX_B_LOGON', 'RUS:Код приложения;ENG:Application Code;', 'CALL_NEXT_FORM', 1),
('ORA2PGSYNCX', 'P_P_VIE1', 'ACTION', 'ORA2PGSYNCX_B_LOGON', 'RUS:Сделать видимым;ENG:Make it visible;', 'PASSWORDT', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'RUS:Вход в приложение;ENG:Enter to application;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CALL_NEXT_FORM', 'COMMAND', null, 'ORA2PGSYNCX_M_MAIN_MENU', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CALL_NEXT_FORM', 'COMMAND_TYPE', null, 'MENU', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CALL_NEXT_FORM', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CALL_NEXT_FORM', 'PROC_INITIALLY', null, replace($A704400830$ApplicationProperty:DMLSOURCE={SQL:(ORA2PGSYNCX)select dmlsource from {ApplicationProperty:ORA2PG_PROC} where xout='{ApplicationProperty:XOUT}'}$A704400830$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CALL_NEXT_FORM', 'ROLE', null, 'WIZARD', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CALL_NEXT_FORM', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CANCEL', 'AFTER', null, 'NONE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CANCEL', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CANCEL', 'EXPLANATION', 'Y', 'RUS:Выход без сохранения изменений;ENG:Exit without saving changes;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CANCEL', 'PROMPT', 'Y', 'RUS:Отказаться;ENG:Cancel;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CANCEL', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'CANCEL', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'MAINTAIN_SCHEMA', 'CAPTION', null, 'XStream (OLR)', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'MAINTAIN_SCHEMA', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'MAINTAIN_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'MAINTAIN_SCHEMA', 'DEFINITION', null, replace($A648971396${SQL:(LUI$)select def_value from lui.lui_t_application_property where app_code='{ApplicationProperty:AppCode}' and code='MAINTAIN_SCHEMA'}$A648971396$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'MAINTAIN_SCHEMA', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'MAINTAIN_SCHEMA', 'VARIANTS', null, replace($A508092413${SQL:(LUI$)select lov from lui.lui_t_application_property where app_code='{ApplicationProperty:AppCode}' and code='MAINTAIN_SCHEMA'}$A508092413$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'ACTIVE', null, '{JS:if ("{F:USERNAME}" && "{F:PASSWORD}") "Y";else "N";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'AFTER', null, 'NEXT_ACTION', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'EXPLANATION', 'Y', 'RUS:Вход в {ApplicationProperty:AppCode};ENG:Logon to {ApplicationProperty:AppCode};', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'NEXT_ACTION', null, 'CALL_NEXT_FORM', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'PROC_INITIALLY', null, replace($A50817728$DBConnect:{ApplicationProperty:AppCode};NAME:Pg Maintainer;MODE:COMMON;USERNAME:{F:USERNAME};PASSWORD:{F:PASSWORD};URL:{F:URL};SCHEMA:{F:SCHEMA};SQL:{F:SQL_AFTER_LOGON};
$A50817728$||$A50817728$
{DECR:{SQL:(LUI$)select connect_info from {F:MAINTAIN_SCHEMA}.ora2pg_proc where xout='{ElementProperty:MAINTAIN_SCHEMA.Show}'}}
$A50817728$||$A50817728$
{DECR:{SQL:(LUI$)select pgconnect_info from {F:MAINTAIN_SCHEMA}.ora2pg_proc where xout='{ElementProperty:MAINTAIN_SCHEMA.Show}'}}
$A50817728$||$A50817728$
OpenSession:{F:USERNAME}
$A50817728$||$A50817728$
StyleSheet:{ApplicationProperty:STYLE_AFTER_LOGON}
$A50817728$||$A50817728$
F:PASSWORD=
$A50817728$||$A50817728$
ApplicationProperty:MAINTAIN_SCHEMA={F:MAINTAIN_SCHEMA}
$A50817728$||$A50817728$
ApplicationProperty:XOUT={ElementProperty:MAINTAIN_SCHEMA.Show}$A50817728$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'PROMPT', null, 'Login', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'OK_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORD', 'CAPTION', null, 'Password', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORD', 'CHANGING', null, 'H', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORD', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORD', 'DEFINITION', null, replace($A722576978${DECR:{SQL:(LUI$)select password from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='{ApplicationProperty:AppCode}'}}$A722576978$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORD', 'HINT', 'Y', 'RUS:Введите пароль;ENG:Enter the password;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORD', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORD', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDT', 'CAPTION', 'Y', 'RUS:Пароль;ENG:Password;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDT', 'CHANGING', null, 'H', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDT', 'DEFINITION', null, replace($A243926639${DECR:{SQL:(LUI$)select password from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='PGTARGET'}}$A243926639$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDT', 'HINT', 'Y', 'RUS:Введите пароль;ENG:Enter the password;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDT', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDT', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDT', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDX', 'CAPTION', 'Y', 'RUS:Пароль;ENG:Password;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDX', 'CHANGING', null, 'H', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDX', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDX', 'DEFINITION', null, replace($A965938301${DECR:{SQL:(LUI$)select password from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='XSTREAM'}}$A965938301$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDX', 'HINT', 'Y', 'RUS:Введите пароль;ENG:Enter the password;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDX', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDX', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'PASSWORDX', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'POSITION$', 'VALUE', null, 'WorkCenter', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE1', 'ACTIVE', null, 'Y', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE1', 'EXPLANATION', 'Y', 'RUS:{JS:if ("{Property:CHANGING}"=="H")"Показать"#$else "Скрыть"#$};ENG:{JS:if ("{Property:CHANGING}"=="H")"Show"#$else "Hide"#$};', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE1', 'ICON', null, '{JS:if ("{Property:CHANGING}"=="H")"unview";else "view";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE1', 'PROC_INITIALLY', null, 'Property:CHANGING={JS:if ("{Property:CHANGING}"=="H")"Y";else "H";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE1', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE2', 'ACTIVE', null, 'Y', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE2', 'EXPLANATION', 'Y', 'RUS:{JS:if ("{Property:CHANGING}"=="H")"Показать"#$else "Скрыть"#$};ENG:{JS:if ("{Property:CHANGING}"=="H")"Show"#$else "Hide"#$};', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE2', 'ICON', null, '{JS:if ("{Property:CHANGING}"=="H")"unview";else "view";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE2', 'PROC_INITIALLY', null, 'Property:CHANGING={JS:if ("{Property:CHANGING}"=="H")"Y";else "H";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIE2', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIEW', 'ACTIVE', null, 'Y', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIEW', 'EXPLANATION', 'Y', 'RUS:{JS:if ("{Property:CHANGING}"=="H")"Показать"#$else "Скрыть"#$};ENG:{JS:if ("{Property:CHANGING}"=="H")"Show"#$else "Hide"#$};', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIEW', 'ICON', null, '{JS:if ("{Property:CHANGING}"=="H")"unview";else "view";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIEW', 'PROC_INITIALLY', null, 'Property:CHANGING={JS:if ("{Property:CHANGING}"=="H")"Y";else "H";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'P_P_VIEW', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMA', 'CAPTION', 'Y', 'RUS:Схема;ENG:Schema;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMA', 'DEFINITION', null, replace($A36788784${SQL:(LUI$)select schema from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='{ApplicationProperty:AppCode}'}$A36788784$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMA', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMA', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMAT', 'CAPTION', 'Y', 'RUS:Схема;ENG:Schema;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMAT', 'DEFINITION', null, replace($A588907284${SQL:(LUI$)select schema from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='PGTARGET'}$A588907284$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMAT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMAT', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMAX', 'CAPTION', 'Y', 'RUS:Схема;ENG:Schema;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMAX', 'DEFINITION', null, replace($A493339517${SQL:(LUI$)select schema from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='SCHEMAX'}$A493339517$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMAX', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SCHEMAX', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SM_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SM_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SQL_AFTER_LOGON', 'CAPTION', 'Y', 'RUS:SQL после входа;ENG:SQL statement after logon;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SQL_AFTER_LOGON', 'DEFINITION', null, replace($A985126079${SQL:(LUI$)select sql from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='{ApplicationProperty:AppCode}'}$A985126079$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SQL_AFTER_LOGON', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SQL_AFTER_LOGON', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SQL_AFTER_LOGONT', 'CAPTION', 'Y', 'RUS:SQL после входа;ENG:SQL statement after logon;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SQL_AFTER_LOGONT', 'DEFINITION', null, replace($A208048029${SQL:(LUI$)select sql from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='PGTARGET'}$A208048029$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SQL_AFTER_LOGONT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SQL_AFTER_LOGONT', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$ABOUT', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$ABOUT', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CALCULATOR', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CALCULATOR', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CHOOSELANGUAGE', 'ACTIVE', null, replace($A139831684${JS: if ('{Property:Var NLSnumberOfLanguages}'>1)'Y';}$A139831684$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CHOOSELANGUAGE', 'DISPLAY', null, '{JS:[{PROMPT:"A"},{PROMPT:"B"}]}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CHOOSELANGUAGE', 'EXPLANATION', 'Y', 'RUS:Изменить язык работы приложения;ENG:Change the language for worked application system;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CHOOSELANGUAGE', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CHOOSELANGUAGE', 'PROC_INITIALLY', 'Y', 'RUS:RunApplication:{ApplicationProperty:AppCode}#$LANG:{LOVC:Укажите язык#${ApplicationProperty:Var NLSlanguages}}#$;ENG:RunApplication:{ApplicationProperty:AppCode}#$LANG:{LOVC:Choose language#${ApplicationProperty:Var NLSlanguages}}#$;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CHOOSELANGUAGE', 'PROMPT', 'Y', 'RUS:Изменить язык;ENG:Change language;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CHOOSELANGUAGE', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CLEARVISUAL', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$CLEARVISUAL', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$DEBUGOFF', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$DEBUGOFF', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$DEBUGON', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$DEBUGON', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$FULLPATH', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$FULLPATH', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$GETSTAT', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$GETSTAT', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$GETTRACEINFO', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$GETTRACEINFO', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$HELP', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'SYSMENU$HELP', 'PROMPT', 'Y', 'RUS:-;ENG:-;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URL', 'CAPTION', 'Y', 'RUS:dbURL;ENG:dbURL;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URL', 'DEFINITION', null, replace($A574682039${SQL:(LUI$)select url from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='{ApplicationProperty:AppCode}'}$A574682039$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URL', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URL', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URLT', 'CAPTION', 'Y', 'RUS:dbURL;ENG:dbURL;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URLT', 'DEFINITION', null, replace($A451634983${SQL:(LUI$)select url from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='PGTARGET'}$A451634983$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URLT', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URLT', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URLX', 'CAPTION', 'Y', 'RUS:dbURL;ENG:dbURL;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URLX', 'DEFINITION', null, replace($A369373177${SQL:(LUI$)select url from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='XSTREAM'}$A369373177$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URLX', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'URLX', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAME', 'CAPTION', null, 'User', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAME', 'DEFINITION', null, replace($A691321102${SQL:(LUI$)select username from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='{ApplicationProperty:AppCode}'}$A691321102$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAME', 'HINT', 'Y', 'RUS:Введите имя пользователя;ENG:Enter the user name;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAME', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAME', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAME', 'VARIANTS', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMET', 'CAPTION', 'Y', 'RUS:Имя пользователя;ENG:User;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMET', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMET', 'DEFINITION', null, replace($A114248072${SQL:(LUI$)select username from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='PGTARGET'}$A114248072$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMET', 'HINT', 'Y', 'RUS:Введите имя пользователя;ENG:Enter the user name;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMET', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMET', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMET', 'VARIANTS', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMET', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMEX', 'CAPTION', 'Y', 'RUS:Имя пользователя;ENG:User;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMEX', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMEX', 'DEFINITION', null, replace($A730453293${SQL:(LUI$)select username from lui_t_dtdbc where app_code='{ApplicationProperty:AppCode}' and code='XSTREAM'}$A730453293$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMEX', 'HINT', 'Y', 'RUS:Введите имя пользователя;ENG:Enter the user name;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMEX', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMEX', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMEX', 'VARIANTS', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'USERNAMEX', 'VISIBLE', null, '0', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'WINDOW_TYPE$', 'VALUE', null, 'Logon', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'WINHEIGHT$', 'VALUE', null, '{JS:if ("{ApplicationProperty:APPEARANCE}"=="vps")"260";else "200";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', 'WINWIDTH$', 'VALUE', null, '388', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', null, 'HEADER', null, 'Logon to {ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_B_LOGON', 'DEFAULT', null, 'ON_LOAD', null, replace($A775790708$FormProperty:Var SysMenu=N
$A775790708$||$A775790708$
JS:var Lang={ApplicationProperty:Var NLSJSlanguages};
if (Object.keys(Lang).length>1)
for (key in Lang) {
Elements["SYSMENU$"+key]={};
Elements["SYSMENU$"+key].EType="ACTION";
Elements["SYSMENU$"+key].PROMPT="[ico:"+key+"]"+Lang[key];
Elements["SYSMENU$"+key].VERIFICATION="N";
Elements["SYSMENU$"+key].PROC_INITIALLY="RunApplication:{ApplicationProperty:AppCode};LANG:"+key+";";
}$A775790708$,chr(13),''), null);
Delete from lui_t_value where form_code='ORA2PGSYNCX_M_MAIN_MENU' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='ORA2PGSYNCX_M_MAIN_MENU' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='ORA2PGSYNCX_M_MAIN_MENU' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='ORA2PGSYNCX_M_MAIN_MENU' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'MENU', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'SEQ', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Sequences;ENG:Sequences;', null, 3),
('ORA2PGSYNCX', 'ERRORS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'Error log', null, 12),
('ORA2PGSYNCX', 'ERR_HNDL_RULES', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Error handle rules;ENG:Error handle rules;', null, 13),
('ORA2PGSYNCX', 'SYSMENU$CHANGE_XOUT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Change Xout;', null, 10002),
('ORA2PGSYNCX', 'AD_DEL_RIGHT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Отобрать доступ у группы;ENG:Revoke access from usergroup;', null, 10001),
('ORA2PGSYNCX', 'TABLES', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'Tables', null, 1),
('ORA2PGSYNCX', 'COLUMNS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'Columns', null, 2),
('ORA2PGSYNCX', 'LUI_RT_DASHBOARD', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Графики в реальном времени;ENG:Real-time dashboards;', null, 1000),
('ORA2PGSYNCX', 'LUI_DATA_GROUPING', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Группировки данных;ENG:Data grouping;', null, 21),
('ORA2PGSYNCX', 'MONITORING', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Мониторинг;ENG:Monitiring;', null, 20),
('ORA2PGSYNCX', 'TUNE', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Настройки;ENG:Configure;', null, 16),
('ORA2PGSYNCX', 'AD', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Администрирование;ENG:Administrative;', null, 15),
('ORA2PGSYNCX', 'WINMAXBUTTON$', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Кнопка максимизации;', null, 10),
('ORA2PGSYNCX', 'WINMAX$', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Максимизировать окно по умолчанию;ENG:Maximize window by default;', null, 9),
('ORA2PGSYNCX', 'POSITION$', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Позиция на экране;ENG:Position;', null, 8),
('ORA2PGSYNCX', 'WINDOW_TYPE$', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Тип окна;ENG:Window type;', null, 7),
('ORA2PGSYNCX', 'PROC', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'Process', null, 11),
('ORA2PGSYNCX', 'P_AUTORUN', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Выполнять действия автоматически;ENG:Run forms automatically;', null, 6),
('ORA2PGSYNCX', 'P_AUTOEXPAND', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Автораскрытие пунктов меню;ENG:Expant menu branch automatically;', null, 5),
('ORA2PGSYNCX', 'SCRIPTS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'Scripts', null, 4),
('ORA2PGSYNCX', 'AD_ADD_RIGHT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Дать доступ группе;ENG:Grant access to usergroup;', null, 10000),
('ORA2PGSYNCX', 'AD_EFFECTIVE_RIGHT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Права пользователей;ENG:Users access rights;', null, 9999),
('ORA2PGSYNCX', 'AD_ACCESS_RIGHT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Права групп пользователей;ENG:Usergroups access;', null, 1005),
('ORA2PGSYNCX', 'EXIT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Действие при закрытии;ENG:Action when closing;', null, 1002),
('ORA2PGSYNCX', 'SYSMENU$ABOUT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:-;ENG:-;', null, 1004),
('ORA2PGSYNCX', 'EXP', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Export settings;ENG:Export settings;', null, 10003),
('ORA2PGSYNCX', 'IMP', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Import settings;ENG:Import settings;', null, 10004),
('ORA2PGSYNCX', 'M_RE_WORKLOAD', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'Replication statistics', 'MONITORING', 5),
('ORA2PGSYNCX', 'MONITORING_XOUT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:XStream out;ENG:XStream out;', 'MONITORING', 7),
('ORA2PGSYNCX', 'M_DML_WORKLOAD', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Postgres DML statistics;ENG:Postgres DML statistics;', 'MONITORING', 6),
('ORA2PGSYNCX', 'M_PG_SESSIONS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Сеансы в БД;ENG:Database sessions;', 'MONITORING', 2),
('ORA2PGSYNCX', 'M_LUI_SESSIONS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Сеансы {F:P_APPCODE};ENG:{F:P_APPCODE} sessions;', 'MONITORING', 1),
('ORA2PGSYNCX', 'M_PG_MUTUAL_LOCKS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Взаимные блокировки в БД;ENG:Mutual database session locks;', 'MONITORING', 3),
('ORA2PGSYNCX', 'M_PG_WORKLOAD', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Cтатистика БД;ENG:DB workload;', 'MONITORING', 4),
('ORA2PGSYNCX', 'MONITORING_OLR', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:OLR;ENG:OLR;', 'MONITORING', 8),
('ORA2PGSYNCX', 'TUNE_ORA_PARAMS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Oracle parameters;ENG:Oracle parameters;', 'TUNE', 2),
('ORA2PGSYNCX', 'TUNE_ALPHABET', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Алфавиты;ENG:Alphabets;', 'TUNE', 6),
('ORA2PGSYNCX', 'TUNE_APP_PARAMETERS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Параметры прикладной системы;ENG:Application parameters;', 'TUNE', 0),
('ORA2PGSYNCX', 'TUNE_FILETYPES', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Типы ассоциируемых файлов;ENG:Types of associated files;', 'TUNE', 7),
('ORA2PGSYNCX', 'TUNE_PG_PARAM', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Параметры БД;ENG:PostgreSQL parameters;', 'TUNE', 1),
('ORA2PGSYNCX', 'TUNE_MESSAGES', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Справочник сообщений;ENG:Error messages;', 'TUNE', 4),
('ORA2PGSYNCX', 'TUNE_LANGUAGES', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Языки;ENG:Languages;', 'TUNE', 5),
('ORA2PGSYNCX', 'TUNE_ADDON', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Дополнения форм;ENG:Addons to forms;', 'TUNE', 8),
('ORA2PGSYNCX', 'AD_ASYNC_TASK', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Асинхронные задачи;ENG:Async tasks;', 'AD', 4),
('ORA2PGSYNCX', 'AD_ACCESS_CONTROL', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Разграничение доступа;ENG:Access control;', 'AD', 2),
('ORA2PGSYNCX', 'AD_LINKED_FILES', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Ассоциированные файлы;ENG:Attached files;', 'AD', 3),
('ORA2PGSYNCX', 'AD_SQL', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Выполнить SQL;ENG:Run SQL;', 'AD', 5),
('ORA2PGSYNCX', 'CONFIG', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:CONF;ENG:CONF;', 'PROC', 1),
('ORA2PGSYNCX', 'ER_P_ADD_WHERE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Доп.условие отбора;ENG:Additional where;', 'AD_EFFECTIVE_RIGHT', 4),
('ORA2PGSYNCX', 'ER_P_OBJ', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Объект;ENG:Object;', 'AD_EFFECTIVE_RIGHT', 3),
('ORA2PGSYNCX', 'ER_P_OBJTYPE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Тип объекта;ENG:Object type;', 'AD_EFFECTIVE_RIGHT', 2),
('ORA2PGSYNCX', 'ER_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код приложения;ENG:AppCode;', 'AD_EFFECTIVE_RIGHT', 1),
('ORA2PGSYNCX', 'AR_P_ADD_WHERE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Доп.условие отбора;ENG:Additional where;', 'AD_ACCESS_RIGHT', 4),
('ORA2PGSYNCX', 'AR_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код приложения;ENG:Application code;', 'AD_ACCESS_RIGHT', 1),
('ORA2PGSYNCX', 'AR_P_OBJ', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код объекта;ENG:Object code;', 'AD_ACCESS_RIGHT', 3),
('ORA2PGSYNCX', 'AR_P_OBJTYPE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Тип объекта;ENG:Object type;', 'AD_ACCESS_RIGHT', 2),
('ORA2PGSYNCX', 'MONITORING_XOUT_SGA', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:SGA;ENG:SGA;', 'MONITORING_XOUT', 1),
('ORA2PGSYNCX', 'MONITORING_XOUT_MEMUSE', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Memory usage;ENG:Memory usage;', 'MONITORING_XOUT', 2),
('ORA2PGSYNCX', 'MONITORING_XOUT_TX', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Transactions;ENG:Transactions;', 'MONITORING_XOUT', 3),
('ORA2PGSYNCX', 'MONITORING_XOUT_ALERTS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Alert history;ENG:Alert history;', 'MONITORING_XOUT', 4),
('ORA2PGSYNCX', 'MONITORING_XOUT_XS_CAPTURE', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:v$xstream_capture;ENG:v$xstream_capture;', 'MONITORING_XOUT', 5),
('ORA2PGSYNCX', 'TAP_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код приложения;ENG:Application code;', 'TUNE_APP_PARAMETERS', 1),
('ORA2PGSYNCX', 'TM_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код прикладной системы;ENG:Application code;', 'TUNE_MESSAGES', 1),
('ORA2PGSYNCX', 'TL_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код прикладной системы;ENG:Application code;', 'TUNE_LANGUAGES', 1),
('ORA2PGSYNCX', 'AD_AC_ACTION_TYPE4OBJECT_TYPE', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Типы действий для управления доступом;ENG:Types of access control actions;', 'AD_ACCESS_CONTROL', 7),
('ORA2PGSYNCX', 'AD_AC_USERS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Пользователи;ENG:Users;', 'AD_ACCESS_CONTROL', 1),
('ORA2PGSYNCX', 'AD_AC_USER_GROUPS', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Группы пользователей;ENG:User groups;', 'AD_ACCESS_CONTROL', 3),
('ORA2PGSYNCX', 'AD_AC_OBJECT_TYPE_RIGHT', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Типы объектов управления доступом;ENG:Types of access management objects;', 'AD_ACCESS_CONTROL', 5),
('ORA2PGSYNCX', 'AD_AC_USERS_HISTORY', 'ACTION', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:История пользователей;ENG:Users history;', 'AD_ACCESS_CONTROL', 8),
('ORA2PGSYNCX', 'AATOT_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код приложения;ENG:Application code;', 'AD_AC_ACTION_TYPE4OBJECT_TYPE', 1),
('ORA2PGSYNCX', 'AU_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код приложения;ENG:Application Code;', 'AD_AC_USERS', 1),
('ORA2PGSYNCX', 'AUG_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код приложения;ENG:Application code;', 'AD_AC_USER_GROUPS', 1),
('ORA2PGSYNCX', 'AOTR_APP_CODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Код приложения;ENG:Application code;', 'AD_AC_OBJECT_TYPE_RIGHT', 1),
('ORA2PGSYNCX', 'AAUH_P_APPCODE', 'PARAM', 'ORA2PGSYNCX_M_MAIN_MENU', 'RUS:Прикладная система;ENG:Application;', 'AD_AC_USERS_HISTORY', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'RUS:Главное меню;ENG:Main menu;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AATOT_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AATOT_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AAUH_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AAUH_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD', 'AUTOEXPAND', null, '{F:P_AUTOEXPAND}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD', 'EXPLANATION', 'Y', 'RUS:Права доступа и др.;ENG:Acess control etc.;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD', 'ICON', null, 'admin', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD', 'PROMPT', 'Y', 'RUS:Администрирование;ENG:Administrative;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_ACTION_TYPE4OBJECT_TYPE', 'COMMAND', null, 'LUI_L_ACTION_TYPE_RIGHT', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_ACTION_TYPE4OBJECT_TYPE', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_ACTION_TYPE4OBJECT_TYPE', 'EXPLANATION', 'Y', 'RUS:Список типов действий для предоставления доступа пользователям.;ENG:A list of action types to grant access to users.;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_ACTION_TYPE4OBJECT_TYPE', 'ICON', null, 'f_tu', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_ACTION_TYPE4OBJECT_TYPE', 'PROMPT', 'Y', 'RUS:Типы действий для управления доступом;ENG:Types of access control actions;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_ACTION_TYPE4OBJECT_TYPE', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_CONTROL', 'AUTOEXPAND', null, '{F:P_AUTOEXPAND}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_CONTROL', 'EXPLANATION', 'Y', 'RUS:Управление пользователями и группами;ENG:Manage users and groups;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_CONTROL', 'ICON', null, 'security', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_CONTROL', 'PROMPT', 'Y', 'RUS:Разграничение доступа;ENG:Access control;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_RIGHT', 'COMMAND', null, 'LUI_L_OBJECT_RIGHT', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_RIGHT', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_RIGHT', 'ICON', null, 'users', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_RIGHT', 'PROMPT', 'Y', 'RUS:[ico:{Property:ICON}]Права групп пользователей;ENG:[ico:{Property:ICON}]Usergroups access;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ACCESS_RIGHT', 'ROLE', null, 'RMB', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_OBJECT_TYPE_RIGHT', 'COMMAND', null, 'LUI_L_OBJECT_TYPE_RIGHT', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_OBJECT_TYPE_RIGHT', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_OBJECT_TYPE_RIGHT', 'EXPLANATION', 'Y', 'RUS:Список типов объектов для предоставления доступа пользователям.;ENG:A list of objects types to grant access to users.;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_OBJECT_TYPE_RIGHT', 'ICON', null, 'Catalog', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_OBJECT_TYPE_RIGHT', 'PROMPT', 'Y', 'RUS:Типы объектов управления доступом;ENG:Types of access management objects;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_OBJECT_TYPE_RIGHT', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USER_GROUPS', 'COMMAND', null, 'LUI_L_USER_GROUP', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USER_GROUPS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USER_GROUPS', 'EXPLANATION', 'Y', 'RUS:Управление группами пользователей;ENG:Manage user groups;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USER_GROUPS', 'ICON', null, 'users', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USER_GROUPS', 'PROMPT', 'Y', 'RUS:Группы пользователей;ENG:User groups;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USER_GROUPS', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS', 'COMMAND', null, 'LUI_L_USER', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS', 'EXPLANATION', 'Y', 'RUS:Управление пользoвателями;ENG:Manage users;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS', 'ICON', null, 'user', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS', 'PROMPT', 'Y', 'RUS:Пользователи;ENG:Users;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS_HISTORY', 'COMMAND', null, 'LUI_L_USER_HISTORY', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS_HISTORY', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS_HISTORY', 'EXPLANATION', 'Y', 'RUS:Отображение списка событий по управлению пользователями;ENG:Display a list of user management events;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS_HISTORY', 'ICON', null, 'history', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS_HISTORY', 'PROMPT', 'Y', 'RUS:История пользователей;ENG:Users history;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_AC_USERS_HISTORY', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ADD_RIGHT', 'ACTIVE', null, '{JS: if ("{Property:CountSelected}"=="0") "N";else "Y";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ADD_RIGHT', 'ICON', null, 'unlock', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ADD_RIGHT', 'PROC_INITIALLY', null, replace($A28996425$PLPGSQL:(LUI$)
declare 
ug lui_d_code32:='{LOVQ:select code,nls(name) from lui_t_usergroup 
where app_code='{ApplicationProperty:AppCode}' 
and lui_f_get_effective_right('USERGROUP',code,'ADM','{ApplicationProperty:AppUser}','{ApplicationProperty:AppCode}')='Y' order by 1}';
items json:='{FormProperty:ItemsSelectedJSON}';
rec record;
begin
for rec in (select key from json_each_text(items)) loop
delete from lui_t_object_right where 
app_code='{ApplicationProperty:AppCode}'
and usersgroup_code=ug and object_type='UI_ELEMENT' 
and object='{FormProperty:Code}.'||rec.key
and action_type='RUN';
insert into lui_t_object_right(app_code,usersgroup_code,object_type,object,action_type,status)
values('{ApplicationProperty:AppCode}',ug,'UI_ELEMENT','{FormProperty:Code}.'||rec.key,'RUN','GRANT');
end loop;
end$A28996425$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ADD_RIGHT', 'PROMPT', 'Y', 'RUS:[ico:{Property:ICON}]Дать доступ группе;ENG:[ico:{Property:ICON}]Grant access to usergroup;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ADD_RIGHT', 'ROLE', null, 'RMB', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ASYNC_TASK', 'ACTIVE', null, replace($A737032685${SQL:(LUI$)select 'Y' from lui_t_form where app_code='{ApplicationProperty:AppCode}' and formtype_code='TASK' limit 1}$A737032685$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ASYNC_TASK', 'COMMAND', null, 'LUI_L_TASK_ASYNC', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ASYNC_TASK', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ASYNC_TASK', 'EXPLANATION', 'Y', 'RUS:Управление асинхронными задачами;ENG:Managing asynchronous tasks;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ASYNC_TASK', 'ICON', null, 'task', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ASYNC_TASK', 'PROMPT', 'Y', 'RUS:Асинхронные задачи;ENG:Async tasks;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_ASYNC_TASK', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_DEL_RIGHT', 'ACTIVE', null, '{JS: if ("{Property:CountSelected}"=="0") "N";else "Y";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_DEL_RIGHT', 'ICON', null, 'lock', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_DEL_RIGHT', 'PROC_INITIALLY', null, replace($A140368769$PLPGSQL:(LUI$)
declare 
ug lui_d_code32:='{LOVQ:select code,nls(name) from lui_t_usergroup 
where app_code='{ApplicationProperty:AppCode}' 
and lui_f_get_effective_right('USERGROUP',code,'ADM','{ApplicationProperty:AppUser}','{ApplicationProperty:AppCode}')='Y' order by 1}';
items json:='{FormProperty:ItemsSelectedJSON}';
rec record;
begin
for rec in (select key from json_each_text(items)) loop
delete from lui_t_object_right where 
app_code='{ApplicationProperty:AppCode}'
and usersgroup_code=ug and object_type='UI_ELEMENT' 
and object='{FormProperty:Code}.'||rec.key
and action_type='RUN';
insert into lui_t_object_right(app_code,usersgroup_code,object_type,object,action_type,status)
values('{ApplicationProperty:AppCode}',ug,'UI_ELEMENT','{FormProperty:Code}.'||rec.key,'RUN','REVOKE');
end loop;
end$A140368769$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_DEL_RIGHT', 'PROMPT', 'Y', 'RUS:[ico:{Property:ICON}]Отобрать доступ у группы;ENG:[ico:{Property:ICON}]Revoke access from usergroup;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_DEL_RIGHT', 'ROLE', null, 'RMB', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_EFFECTIVE_RIGHT', 'COMMAND', null, 'LUI_L_EFF_OBJECT_RIGHTS', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_EFFECTIVE_RIGHT', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_EFFECTIVE_RIGHT', 'ICON', null, 'user', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_EFFECTIVE_RIGHT', 'PROMPT', 'Y', 'RUS:[ico:{Property:ICON}]Права пользователей;ENG:[ico:{Property:ICON}]Users access rights;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_EFFECTIVE_RIGHT', 'ROLE', null, 'RMB', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_LINKED_FILES', 'COMMAND', null, 'LUI_L_LINKED_FILE_ALL', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_LINKED_FILES', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_LINKED_FILES', 'ICON', null, 'clip', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_LINKED_FILES', 'PROMPT', 'Y', 'RUS:Ассоциированные файлы;ENG:Attached files;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_LINKED_FILES', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_SQL', 'COMMAND', null, 'LUI_B_SQL', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_SQL', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_SQL', 'EXPLANATION', 'Y', 'RUS:Выполнить SQL;ENG:Run SQL;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_SQL', 'ICON', null, 'pg', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_SQL', 'PROMPT', 'Y', 'RUS:Выполнить SQL;ENG:Run SQL;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AD_SQL', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AOTR_APP_CODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AOTR_APP_CODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AR_P_ADD_WHERE', 'NAME', null, 'P_ADD_WHERE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AR_P_ADD_WHERE', 'VALUE', null, replace($A13889502$and r.action_type='RUN'$A13889502$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AR_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AR_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AR_P_OBJ', 'NAME', null, 'P_OBJ', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AR_P_OBJ', 'VALUE', null, '{FormProperty:Code}.{FormProperty:CurrentMenuItem}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AR_P_OBJTYPE', 'NAME', null, 'P_OBJTYPE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AR_P_OBJTYPE', 'VALUE', null, 'UI_ELEMENT', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AUG_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AUG_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AU_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'AU_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'COLUMNS', 'COMMAND', null, 'COLUMNS', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'COLUMNS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'COLUMNS', 'ICON', null, 'vlist', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'COLUMNS', 'PROMPT', 'N', 'Columns', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'CONFIG', 'NAME', null, 'CONFIG', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'CONFIG', 'VALUE', null, '{JS:if ("{ApplicationProperty:DMLSOURCE}"=="xstream")"DEFAULT";else "OLR";}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ER_P_ADD_WHERE', 'NAME', null, 'P_ADD_WHERE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ER_P_ADD_WHERE', 'VALUE', null, replace($A213691068$and atr.code = 'RUN'$A213691068$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ER_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ER_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ER_P_OBJ', 'NAME', null, 'P_OBJ', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ER_P_OBJ', 'VALUE', null, '{FormProperty:Code}.{FormProperty:CurrentMenuItem}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ER_P_OBJTYPE', 'NAME', null, 'P_OBJTYPE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ER_P_OBJTYPE', 'VALUE', null, 'UI_ELEMENT', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ERR_HNDL_RULES', 'COMMAND', null, 'ERRHNDL', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ERR_HNDL_RULES', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ERR_HNDL_RULES', 'ICON', null, 'S_YELLOW_16', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ERR_HNDL_RULES', 'PROMPT', null, 'Error handle rules', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ERRORS', 'COMMAND', null, 'ERRLOG', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ERRORS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ERRORS', 'ICON', null, 'S_RED_16', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'ERRORS', 'PROMPT', 'N', 'Error log', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'EXIT', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'EXIT', 'PROC_INITIALLY', null, 'CloseSession:', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'EXIT', 'PROMPT', 'Y', 'RUS:Действие при закрытии;ENG:Action when closing;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'EXIT', 'ROLE', null, 'CLOSE WIZARD', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'EXP', 'COMMAND', null, 'RELEASES', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'EXP', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'EXP', 'ICON', null, 'download', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'EXP', 'PROMPT', 'Y', 'ENG:Export settings;RUS:Export settings;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'IMP', 'COMMAND', null, 'RELEASES_IMP', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'IMP', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'IMP', 'ICON', null, 'upload', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'IMP', 'PROMPT', 'Y', 'RUS:Import settings;ENG:Import settings;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_DATA_GROUPING', 'ACTIVE', null, replace($A267339462${SQL:(LUI$)select 'Y' from lui_t_data_grouping where app_code='{ApplicationProperty:AppCode}' and user_name='{ApplicationProperty:AppUser}' and is_stored='Y' and run_from_main_menu='Y' limit 1}$A267339462$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_DATA_GROUPING', 'AUTOEXPAND', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_DATA_GROUPING', 'COMMAND', null, 'LUI_L_DATA_GROUPING_MENU', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_DATA_GROUPING', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_DATA_GROUPING', 'EXPLANATION', 'Y', 'RUS:Группировки данных;ENG:Data grouping;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_DATA_GROUPING', 'ICON', null, 'sum', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_DATA_GROUPING', 'PROMPT', 'Y', 'RUS:Группировки данных;ENG:Data groupings;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_DATA_GROUPING', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_RT_DASHBOARD', 'ACTIVE', null, replace($A954077288${SQL:(LUI$)select 'Y' from lui_t_dashboard where app_code='{ApplicationProperty:AppCode}' and run_from_main_menu='Y' 
and username='{ApplicationProperty:AppUser}' limit 1}$A954077288$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_RT_DASHBOARD', 'COMMAND', null, 'LUI_L_RT_DASHBOARD_MENU', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_RT_DASHBOARD', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_RT_DASHBOARD', 'EXPLANATION', 'Y', 'RUS:Графики в реальном времени;ENG:Real-time dashboards;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_RT_DASHBOARD', 'ICON', null, 'pulse', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_RT_DASHBOARD', 'PROMPT', 'Y', 'RUS:Графики в реальном времени;ENG:Real-time dashboards;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'LUI_RT_DASHBOARD', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_DML_WORKLOAD', 'COMMAND', null, 'PGDMLSTAT', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_DML_WORKLOAD', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_DML_WORKLOAD', 'ICON', null, 'pg', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_DML_WORKLOAD', 'PROMPT', null, 'Postgres DML statistics', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_LUI_SESSIONS', 'COMMAND', null, 'LUI_L_SESSION', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_LUI_SESSIONS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_LUI_SESSIONS', 'EXPLANATION', 'Y', 'RUS:Сеансы пользователей в прикладной системе;ENG:User sessions in the application system;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_LUI_SESSIONS', 'ICON', null, 'lui_sessions', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_LUI_SESSIONS', 'PROMPT', 'Y', 'RUS:Сеансы в {ApplicationProperty:AppCode};ENG:{ApplicationProperty:AppCode} sessions;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING', 'AUTOEXPAND', null, '{F:P_AUTOEXPAND}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING', 'EXPLANATION', 'Y', 'RUS:Cписки сеансов пользователей и прочее;ENG:Users sessions etc.;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING', 'ICON', null, 'tree_marketing', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING', 'PROMPT', 'Y', 'RUS:Мониторинг;ENG:Monitoring;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_OLR', 'COMMAND', null, 'OLR_METRICS', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_OLR', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_OLR', 'PROMPT', 'Y', 'RUS:OLR;ENG:OLR;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT', 'ICON', null, 'x', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT', 'PROMPT', 'Y', 'RUS:XStream out;ENG:XStream out;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_ALERTS', 'COMMAND', null, 'V_X_ALERT_HIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_ALERTS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_ALERTS', 'PROMPT', 'Y', 'RUS:Alert history;ENG:Alert history;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_MEMUSE', 'COMMAND', null, 'V_X_STREAMS_POOL_STAT', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_MEMUSE', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_MEMUSE', 'PROMPT', 'Y', 'RUS:Memory usage;ENG:Memory usage;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_SGA', 'COMMAND', null, 'V_X_SGA_DYNAMIC_COMP', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_SGA', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_SGA', 'PROMPT', 'Y', 'RUS:SGA;ENG:SGA;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_TX', 'COMMAND', null, 'V_X_TX', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_TX', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_TX', 'PROMPT', 'Y', 'RUS:Transactions;ENG:Transactions;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_XS_CAPTURE', 'COMMAND', null, 'V_X_CAPTURE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_XS_CAPTURE', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'MONITORING_XOUT_XS_CAPTURE', 'PROMPT', 'Y', 'RUS:v$xstream_capture;ENG:v$xstream_capture;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_MUTUAL_LOCKS', 'COMMAND', null, 'LUI_L_PG_MUTUAL_LOCKS', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_MUTUAL_LOCKS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_MUTUAL_LOCKS', 'EXPLANATION', 'Y', 'RUS:Список сеансов блокирующих другие сеансы;ENG:List of sessions blocking other sessions;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_MUTUAL_LOCKS', 'ICON', null, 'chain', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_MUTUAL_LOCKS', 'PROMPT', 'Y', 'RUS:Mutual locks в Pg target;ENG:Mutual database session locks;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_SESSIONS', 'COMMAND', null, 'LUI_L_PG_SESSION', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_SESSIONS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_SESSIONS', 'EXPLANATION', 'Y', 'RUS:Список сеансов пользователей в PostgreSQL;ENG:List of user sessions in PostgreSQL;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_SESSIONS', 'ICON', null, 'db_sessions', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_SESSIONS', 'PROMPT', 'Y', 'RUS:Sessions in Pg Target;ENG:Database sessions;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_WORKLOAD', 'ACTIVE', null, 'Y', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_WORKLOAD', 'COMMAND', null, 'LUI_L_PG_STAT_DATABASE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_WORKLOAD', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_WORKLOAD', 'EXPLANATION', 'Y', 'RUS:Статисика нагрузни на базу данных Postgres ;ENG:Postgres database workload statistics;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_WORKLOAD', 'ICON', null, 'chart_line', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_PG_WORKLOAD', 'PROMPT', 'Y', 'RUS:Statistics in Pg target;ENG:DB statistics;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_RE_WORKLOAD', 'COMMAND', null, 'STATS', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_RE_WORKLOAD', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_RE_WORKLOAD', 'ICON', null, 'pulse', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'M_RE_WORKLOAD', 'PROMPT', 'N', 'Replication statistics', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'P_AUTOEXPAND', 'VALUE', null, replace($A924731406${SQL:(LUI$)select lui_f_get_application_property('{F:P_APPCODE}','MAIN_MENU_AUTOEXPAND')}$A924731406$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'P_AUTORUN', 'VALUE', null, replace($A300143518${SQL:(LUI$)select case lui_f_get_application_property('{F:P_APPCODE}','MAIN_MENU_AUTORUNITEM') when 'Y' then 'AUTO' else 'DBLCLICK' end}$A300143518$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'POSITION$', 'VALUE', null, 'TopLeft', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'PROC', 'COMMAND', null, 'PROC', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'PROC', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'PROC', 'ICON', null, 'work', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'PROC', 'PROC_INITIALLY', null, replace($A119193762$ApplicationProperty:DMLSOURCE={SQL:(ORA2PGSYNCX)select dmlsource from {ApplicationProperty:ORA2PG_PROC} where xout='{ApplicationProperty:XOUT}'}$A119193762$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'PROC', 'PROMPT', null, 'Replication process', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SCRIPTS', 'COMMAND', null, 'SCRIPTS', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SCRIPTS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SCRIPTS', 'ICON', null, 'script', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SCRIPTS', 'PROMPT', 'N', 'Scripts', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SEQ', 'COMMAND', null, 'SEQUENCES', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SEQ', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SEQ', 'ICON', null, '123', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SEQ', 'PROMPT', 'Y', 'RUS:Sequences;ENG:Sequences;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$ABOUT', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$ABOUT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$ABOUT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$CHANGE_XOUT', 'ACTIVE', null, replace($A837877296$Y{SQL:(LUI$)select 'N' from lui.lui_t_application_property ltap 
where app_code='ORA2PGSYNCX' and ltap.code ='MAINTAIN_SCHEMA'
and lov not like '%;%;%'}$A837877296$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$CHANGE_XOUT', 'EXPLANATION', null, 'Switch to another Xout', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$CHANGE_XOUT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$CHANGE_XOUT', 'PROC_FINALLY', null, replace($A421094994$DBDisconnect:XSTREAM;
$A421094994$||$A421094994$
DBDisconnect:PGTARGET;
$A421094994$||$A421094994$
{DECR:{SQL:(LUI$)select connect_info from {ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_proc where xout='{ApplicationProperty:XOUT}'}}
$A421094994$||$A421094994$
{DECR:{SQL:(LUI$)select pgconnect_info from {ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_proc where xout='{ApplicationProperty:XOUT}'}}$A421094994$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$CHANGE_XOUT', 'PROC_INITIALLY', null, replace($A227841349${PLPGSQL:(LUI$)
declare maintain_schema text='{Parse:{SQL:(LUI$)select '{'||'LOVD:'||
lui_f_collection(replace(lov,'LOVD:',''),'{ApplicationProperty:MAINTAIN_SCHEMA}',null::text)
||'}' from lui.lui_t_application_property where app_code='{ApplicationProperty:AppCode}' and code='MAINTAIN_SCHEMA'}}';
        xout text;
        retval text;
begin
select lui_f_get_element(replace(lov,'LOVD:',''),maintain_schema) into xout 
from lui.lui_t_application_property where app_code='{ApplicationProperty:AppCode}' and code='MAINTAIN_SCHEMA';
retval='ApplicationProperty:MAINTAIN_SCHEMA='||maintain_schema;
retval=retval||chr(10)||chr(10);
retval=retval||'ApplicationProperty:XOUT='||xout;
execute lui_r_variable('RETVAL',retval);
end;
}$A227841349$,chr(13),''), null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$CHANGE_XOUT', 'PROMPT', null, '[ico:x]Switch to another Xout', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'SYSMENU$CHANGE_XOUT', 'ROLE', null, '', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TABLES', 'COMMAND', null, 'TABLES', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TABLES', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TABLES', 'ICON', null, 'grid', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TABLES', 'PROMPT', null, 'Tables', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TAP_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TAP_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TL_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TL_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TM_P_APPCODE', 'NAME', null, 'P_APPCODE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TM_P_APPCODE', 'VALUE', null, '{ApplicationProperty:AppCode}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE', 'AUTOEXPAND', null, '{F:P_AUTOEXPAND}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE', 'EXPLANATION', 'Y', 'RUS:Выполнение настроек. Коды текстов сообщений и др.;ENG:Error messages etc.;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE', 'ICON', null, 'tuning', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE', 'PROMPT', 'Y', 'RUS:Настройки;ENG:Configure;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ADDON', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ADDON', 'COMMAND', null, 'LUI_L_ADDON', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ADDON', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ADDON', 'EXPLANATION', 'Y', 'RUS:Описания дополнений к формам приложения;ENG:Addons descriptions for applications forms;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ADDON', 'ICON', null, 'addons', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ADDON', 'PROMPT', 'Y', 'RUS:Дополнения форм;ENG:Addons to forms;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ADDON', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ALPHABET', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ALPHABET', 'COMMAND', null, 'LUI_L_ALPHABET', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ALPHABET', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ALPHABET', 'EXPLANATION', 'Y', 'RUS:Алфавиты позволяют настроить проверку и коррекцию данных вводимых пользоваетелями в полях форм;ENG:Alphabets allow you to set up validation and correction of data entered by users in the form fields;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ALPHABET', 'ICON', null, 'litera', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ALPHABET', 'PROMPT', 'Y', 'RUS:Алфавиты;ENG:Alphabets;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_APP_PARAMETERS', 'COMMAND', null, 'LUI_L_APPLICATION_PROPERTY', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_APP_PARAMETERS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_APP_PARAMETERS', 'EXPLANATION', 'Y', 'RUS:Параметры настройки, задаваемые на уровне приложения;ENG:Application-level settings;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_APP_PARAMETERS', 'ICON', null, 'LOV', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_APP_PARAMETERS', 'PROMPT', 'Y', 'RUS:Параметры {ApplicationProperty:AppCode};ENG:{ApplicationProperty:AppCode} Application parameters;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_FILETYPES', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_FILETYPES', 'COMMAND', null, 'LUI_L_FILETYPE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_FILETYPES', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_FILETYPES', 'EXPLANATION', 'Y', 'RUS:Настройка привязки данных приложения к связанным файлам;ENG:Setting binding application data with associated files ;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_FILETYPES', 'ICON', null, 'copy', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_FILETYPES', 'PROMPT', 'Y', 'RUS:Типы ассоциируемых файлов;ENG:Types of associated files;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_FILETYPES', 'ROLE', null, '{F:P_AUTORUN}', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_LANGUAGES', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_LANGUAGES', 'COMMAND', null, 'LUI_L_LANGUAGE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_LANGUAGES', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_LANGUAGES', 'EXPLANATION', 'Y', 'RUS:Список нац. языков приложения;ENG:Application national languages;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_LANGUAGES', 'ICON', null, 'planet', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_LANGUAGES', 'PROMPT', 'Y', 'RUS:Языки;ENG:Languages;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_MESSAGES', 'ACTIVE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_MESSAGES', 'COMMAND', null, 'LUI_L_MESSAGE', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_MESSAGES', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_MESSAGES', 'EXPLANATION', 'Y', 'RUS:Список сообщений об ошибках, предупреждений и информационных сообщений;ENG:List of error, warning, and informational messages;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_MESSAGES', 'ICON', null, 'cards', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_MESSAGES', 'PROMPT', 'Y', 'RUS:Справочник сообщений;ENG:Error messages;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ORA_PARAMS', 'COMMAND', null, 'V_X_PARAMETER', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ORA_PARAMS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ORA_PARAMS', 'ICON', null, '0', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_ORA_PARAMS', 'PROMPT', 'Y', 'RUS:Oracle parameters;ENG:Oracle parameters;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_PG_PARAM', 'COMMAND', null, 'LUI_L_PG_PARAM', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_PG_PARAM', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_PG_PARAM', 'ICON', null, 'pg', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'TUNE_PG_PARAM', 'PROMPT', 'Y', 'RUS:PostgreSQL(target) parameters;ENG:PostgreSQL parameters;', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'WINDOW_TYPE$', 'VALUE', null, 'MainMenu', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'WINMAX$', 'VALUE', null, 'Y', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', 'WINMAXBUTTON$', 'VALUE', null, 'N', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', null, 'HEADER', null, 'XStream and OLR replication from Oracle to Postgres ({ApplicationProperty:XOUT})', null),
('ORA2PGSYNCX', 'ORA2PGSYNCX_M_MAIN_MENU', 'DEFAULT', null, 'ON_LOAD', null, '', null);
Delete from lui_t_value where form_code='PGDMLSTAT' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='PGDMLSTAT' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='PGDMLSTAT' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='PGDMLSTAT' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'PGDMLSTAT', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'PGDMLSTAT', 'RUS:XStream server;', null, 1),
('ORA2PGSYNCX', 'SLOT_NAME', 'ITEM', 'PGDMLSTAT', 'RUS:Слот;', null, 2),
('ORA2PGSYNCX', 'PG_SCHEMA', 'ITEM', 'PGDMLSTAT', 'RUS:Имя схемы в postgres;', null, 3),
('ORA2PGSYNCX', 'PG_TABLE', 'ITEM', 'PGDMLSTAT', 'RUS:Имя таблицы в postgres;', null, 4),
('ORA2PGSYNCX', 'DML_TYPE', 'ITEM', 'PGDMLSTAT', 'RUS:Тип DML-оператора;', null, 5),
('ORA2PGSYNCX', 'CNT', 'ITEM', 'PGDMLSTAT', 'RUS:Количество выполнений;', null, 6),
('ORA2PGSYNCX', 'TOTAL_TIME', 'ITEM', 'PGDMLSTAT', 'RUS:Общее время;', null, 8),
('ORA2PGSYNCX', 'MIN_TIME', 'ITEM', 'PGDMLSTAT', 'RUS:Минимальное время;', null, 10),
('ORA2PGSYNCX', 'MAX_TIME', 'ITEM', 'PGDMLSTAT', 'RUS:Максимальное время;', null, 11),
('ORA2PGSYNCX', 'SPLIT', 'ITEM', 'PGDMLSTAT', 'RUS:Признак разделяемости таблицы по слотам;', null, 16),
('ORA2PGSYNCX', 'AVG_TIME', 'ITEM', 'PGDMLSTAT', 'RUS:Avg_time;ENG:Avg_time;', null, 9),
('ORA2PGSYNCX', 'BYTES', 'ITEM', 'PGDMLSTAT', 'RUS:bytes;', null, 7),
('ORA2PGSYNCX', 'LAST_CHANGE', 'ITEM', 'PGDMLSTAT', 'RUS:Дата и время последнего выполнения;', null, 15),
('ORA2PGSYNCX', 'FIRST_CHANGE', 'ITEM', 'PGDMLSTAT', 'RUS:Дата и время первого выполнения;', null, 14),
('ORA2PGSYNCX', 'FIRST_TIME', 'ITEM', 'PGDMLSTAT', 'RUS:first_time;', null, 12),
('ORA2PGSYNCX', 'LAST_TIME', 'ITEM', 'PGDMLSTAT', 'RUS:last_time;', null, 13);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'RUS:Postgres DML statistics;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'AVG_TIME', 'CAPTION', 'Y', 'RUS:Avg_time;ENG:Avg_time;', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'AVG_TIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'AVG_TIME', 'DEFINITION', null, 'ora2pg_pgdmlstats.total_time/ora2pg_pgdmlstats.cnt', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'AVG_TIME', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'AVG_TIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'AVG_TIME', 'TOTAL', null, 'AVG("AVG_TIME")', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'BYTES', 'CAPTION', null, 'Total_bytes', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'BYTES', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'BYTES', 'DEFINITION', null, 'ora2pg_pgdmlstats.bytes', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'BYTES', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'BYTES', 'HINT', null, 'bytes', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'BYTES', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'BYTES', 'TOTAL', null, 'SUM("BYTES")', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'CNT', 'CAPTION', null, 'Executing', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'CNT', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'CNT', 'DEFINITION', null, 'ora2pg_pgdmlstats.cnt', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'CNT', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'CNT', 'HINT', null, 'Количество выполнений', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'CNT', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'CNT', 'TOTAL', null, 'SUM("CNT")', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'DML_TYPE', 'CAPTION', null, 'DML_Type', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'DML_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'DML_TYPE', 'DEFINITION', null, 'ora2pg_pgdmlstats.dml_type', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'DML_TYPE', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'DML_TYPE', 'HINT', null, 'Тип DML-оператора', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'DML_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_CHANGE', 'CAPTION', null, 'First_change', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_CHANGE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_CHANGE', 'DEFINITION', null, 'ora2pg_pgdmlstats.first_change', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_CHANGE', 'FORMAT', null, 'dd.mm.yyyy hh24:mi:ss.ms', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_CHANGE', 'HINT', null, 'Дата и время первого выполнения', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_CHANGE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_CHANGE', 'TOTAL', null, 'MIN("FIRST_CHANGE")', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_TIME', 'CAPTION', null, 'First_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_TIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_TIME', 'DEFINITION', null, 'ora2pg_pgdmlstats.first_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_TIME', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_TIME', 'HINT', null, 'first_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'FIRST_TIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_CHANGE', 'CAPTION', null, 'Last_change', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_CHANGE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_CHANGE', 'DEFINITION', null, 'ora2pg_pgdmlstats.last_change', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_CHANGE', 'FORMAT', null, 'dd.mm.yyyy hh24:mi:ss.ms', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_CHANGE', 'HINT', null, 'Дата и время последнего выполнения', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_CHANGE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_CHANGE', 'TOTAL', null, 'MAX("LAST_CHANGE")', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_TIME', 'CAPTION', null, 'Last_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_TIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_TIME', 'DEFINITION', null, 'ora2pg_pgdmlstats.last_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_TIME', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_TIME', 'HINT', null, 'last_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'LAST_TIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MAX_TIME', 'CAPTION', null, 'Max_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MAX_TIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MAX_TIME', 'DEFINITION', null, 'ora2pg_pgdmlstats.max_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MAX_TIME', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MAX_TIME', 'HINT', null, 'Максимальное время', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MAX_TIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MAX_TIME', 'TOTAL', null, 'MAX("MAX_TIME")', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MIN_TIME', 'CAPTION', null, 'Min_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MIN_TIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MIN_TIME', 'DEFINITION', null, 'ora2pg_pgdmlstats.min_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MIN_TIME', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MIN_TIME', 'HINT', null, 'Минимальное время', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MIN_TIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'MIN_TIME', 'TOTAL', null, 'MIN("MIN_TIME")', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_SCHEMA', 'CAPTION', null, 'Pg_schema', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_SCHEMA', 'DEFINITION', null, 'ora2pg_pgdmlstats.pg_schema', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_SCHEMA', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_SCHEMA', 'HINT', null, 'Имя схемы в postgres', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_TABLE', 'CAPTION', null, 'Pg_table', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_TABLE', 'DEFINITION', null, 'ora2pg_pgdmlstats.pg_table', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_TABLE', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_TABLE', 'HINT', null, 'Имя таблицы в postgres', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'PG_TABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SLOT_NAME', 'CAPTION', null, 'Slot', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SLOT_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SLOT_NAME', 'DEFINITION', null, 'ora2pg_pgdmlstats.slot_name', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SLOT_NAME', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SLOT_NAME', 'HINT', null, 'Слот', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SLOT_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SPLIT', 'CAPTION', null, 'Split', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SPLIT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SPLIT', 'DEFINITION', null, 'ora2pg_pgdmlstats.split', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SPLIT', 'HINT', null, 'Признак разделяемости таблицы по слотам', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'SPLIT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'TOTAL_TIME', 'CAPTION', null, 'Total_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'TOTAL_TIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'TOTAL_TIME', 'DEFINITION', null, 'ora2pg_pgdmlstats.total_time', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'TOTAL_TIME', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'TOTAL_TIME', 'HINT', null, 'Общее время', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'TOTAL_TIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'TOTAL_TIME', 'SORT', null, '-1', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'TOTAL_TIME', 'TOTAL', null, 'SUM("TOTAL_TIME")', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'XOUT', 'CAPTION', null, 'XStream server', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_pgdmlstats.xout', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'XOUT', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'XOUT', 'HINT', null, 'XStream server', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', null, 'ACTION_BEFORE_QUERY', null, 'PLPGSQL:begin null;end;', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', null, 'HEADER', null, 'Postgres DML statistics', null),
('ORA2PGSYNCX', 'PGDMLSTAT', 'DEFAULT', null, 'QUERY_TEXT', null, 'select * from {ApplicationProperty:ORA2PG_PGDMLSTATS} ora2pg_pgdmlstats', null);
Delete from lui_t_value where form_code='PROC' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='PROC' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='PROC' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='PROC' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'PROC', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'SYSMENU$EXECUTEQUERY', 'ACTION', 'PROC', 'RUS:Выполнение запроса;', null, 7),
('ORA2PGSYNCX', 'LOGMNR_STATE', 'ITEM', 'PROC', 'logmnr_state', null, 18),
('ORA2PGSYNCX', 'M_RE_WORKLOAD', 'ACTION', 'PROC', 'RUS:Replication statistics;ENG:Replication statistics;', null, 11),
('ORA2PGSYNCX', 'XOUT_STATE', 'ITEM', 'PROC', 'xout_state', null, 20),
('ORA2PGSYNCX', 'CAPTURE_STATE', 'ITEM', 'PROC', 'capture_state', null, 19),
('ORA2PGSYNCX', 'M_DML_WORKLOAD', 'ACTION', 'PROC', 'RUS:Postgres DML statistics;ENG:Postgres DML statistics;', null, 12),
('ORA2PGSYNCX', 'DEBUG_WIN', 'ACTION', 'PROC', 'RUS:Debug Window;', null, 10),
('ORA2PGSYNCX', 'REFRESH', 'ACTION', 'PROC', 'Refresh', null, 3),
('ORA2PGSYNCX', 'DURATION', 'ITEM', 'PROC', 'Duration', null, 7),
('ORA2PGSYNCX', 'STATUS', 'ITEM', 'PROC', 'status', null, 17),
('ORA2PGSYNCX', 'JVM_MEM_USED_PCT', 'ITEM', 'PROC', 'jvm_mem_used_pct', null, 16),
('ORA2PGSYNCX', 'JVM_MEM_USED', 'ITEM', 'PROC', 'jvm_mem_used', null, 15),
('ORA2PGSYNCX', 'JVM_MEM_TOTAL', 'ITEM', 'PROC', 'jvm_mem_total', null, 14),
('ORA2PGSYNCX', 'ARCLOG_SIZE', 'ITEM', 'PROC', 'arclog_size', null, 13),
('ORA2PGSYNCX', 'START_TIME', 'ITEM', 'PROC', 'stat_time', null, 6),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'PROC', 'xout', null, 5),
('ORA2PGSYNCX', 'SLOTS', 'ACTION', 'PROC', 'Slots', null, 2),
('ORA2PGSYNCX', 'WINACTIVEABLE$', 'PARAM', 'PROC', 'Window activable', null, 1),
('ORA2PGSYNCX', 'RESPONSE', 'ITEM', 'PROC', 'RUS:response;', null, 22),
('ORA2PGSYNCX', 'ERROR', 'ITEM', 'PROC', 'error', null, 24),
('ORA2PGSYNCX', 'COMMAND', 'ITEM', 'PROC', 'command', null, 21),
('ORA2PGSYNCX', 'XS', 'ITEM', 'PROC', 'SessState', null, 25),
('ORA2PGSYNCX', 'OTIME_MINUS_PTIME', 'ITEM', 'PROC', 'otime-ptime', null, 26),
('ORA2PGSYNCX', 'DEBUG_WIN_P_XOUT', 'PARAM', 'PROC', 'xout', 'DEBUG_WIN', 1),
('ORA2PGSYNCX', 'PARAMS', 'ACTION', 'PROC', 'Parametres', 'XOUT', 4),
('ORA2PGSYNCX', 'SLOTS_P_XOUT', 'PARAM', 'PROC', 'xout', 'SLOTS', 1),
('ORA2PGSYNCX', 'SLOTS_P_OTIME_MINUS_PTIME', 'PARAM', 'PROC', 'otime-ptime', 'SLOTS', 2),
('ORA2PGSYNCX', 'COMMAND_SEND', 'ACTION', 'PROC', 'Send command', 'COMMAND', 1),
('ORA2PGSYNCX', 'PARAMS_P_XOUT', 'PARAM', 'PROC', 'xout', 'PARAMS', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'Process', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ARCLOG_SIZE', 'CAPTION', 'N', 'arclog_size', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ARCLOG_SIZE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ARCLOG_SIZE', 'DEFINITION', null, 'pg_size_pretty(ora2pg_proc.arclog_size)', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ARCLOG_SIZE', 'HINT', 'N', 'arclog_size', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ARCLOG_SIZE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'CAPTURE_STATE', 'CAPTION', null, 'capture state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'CAPTURE_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'CAPTURE_STATE', 'DEFINITION', null, 'ora2pg_proc.capture_state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'CAPTURE_STATE', 'HINT', 'N', 'capture_state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'CAPTURE_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'CAPTURE_STATE', 'VISIBLE', null, 'Y', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND', 'CAPTION', 'N', 'command', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND', 'DEFINITION', null, 'ora2pg_proc.command', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND', 'HINT', 'N', 'command', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND_SEND', 'ACTIVE', null, replace($A858700313${JS:if ("{F:COMMAND}")"N";
else if ("{F:XS}"!="ACTIVE" && "{F:XS}"!="INACTIVE" && "{ApplicationProperty:DMLSOURCE}"=="xstream")"N";else "EXIST";}$A858700313$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND_SEND', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND_SEND', 'DISPLAY', null, '{JS: if ("{Property:ACTIVE}"=="N")"N";else "Y";}', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND_SEND', 'ICON', null, 'ArrowN', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND_SEND', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND_SEND', 'PROC_FINALLY', null, replace($A687091061$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_PROC} set command=
{QuoteNull:{LOVQ:(ORA2PGSYNCX) select 'ABORT' union all
                    select 'PAUSE' union all
                    select 'CONTINUE' union all
                    select 'STOP' union all
                    select 'STOP_AND_RESTART' union all
                    select 'RESTART' union all
                    select 'CLEAR_HISTORY' union all
                    select 'RESET_COUNTERS' union all
                    select 'RESET_PGDMLSTATS'
}}
where xout={F2SQL:XOUT}$A687091061$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'COMMAND_SEND', 'PROMPT', null, '[ico:ArrowN]Send command', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN', 'ACTION_DEV_NOTES', null, replace($A478104328$SQL:update {ApplicationProperty:ORA2PG_PROC_PAR} set param_Value='Y' where xout={F2SQL:XOUT} and param_Code='Debug';
update {ApplicationProperty:ORA2PG_PROC} set command='SET_PARAMS' where xout={F2SQL:XOUT};$A478104328$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN', 'ACTIVE', null, replace($A719552476${SQL:(ORA2PGSYNCX)select /*{ApplicationProperty:CheckDebug}*/
'Y' from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:XOUT} and param_code='Debug' and param_value='Y'}$A719552476$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN', 'COMMAND', null, 'DEBUG', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN', 'ICON', null, '{JS:if ("{Property:ACTIVE}"=="Y")"debug";else "";}', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN', 'PROMPT', 'N', 'Debug Window', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DEBUG_WIN_P_XOUT', 'VALUE', null, '{F:XOUT}', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DURATION', 'CAPTION', null, 'duration', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DURATION', 'DATA_TYPE', null, 'INTERVAL_DS', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DURATION', 'DEFINITION', null, 'ora2pg_proc.duration', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'DURATION', 'ITEM_TEMPLATE', null, 'ITEM_INTERVAL_DS', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ERROR', 'CAPTION', 'N', 'error', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ERROR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ERROR', 'DEFINITION', null, 'ora2pg_proc.error', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ERROR', 'HINT', 'N', 'error', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'ERROR', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_TOTAL', 'CAPTION', 'N', 'jvm_mem_total', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_TOTAL', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_TOTAL', 'DEFINITION', null, 'pg_size_pretty(ora2pg_proc.jvm_mem_total)', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_TOTAL', 'HINT', 'N', 'jvm_mem_total', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_TOTAL', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED', 'CAPTION', 'N', 'jvm_mem_used', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED', 'DEFINITION', null, 'pg_size_pretty(ora2pg_proc.jvm_mem_used)', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED', 'HINT', 'N', 'jvm_mem_used', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED_PCT', 'CAPTION', 'N', 'jvm_mem_used_pct', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED_PCT', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED_PCT', 'DEFINITION', null, 'ora2pg_proc.jvm_mem_used_pct', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED_PCT', 'HINT', 'N', 'jvm_mem_used_pct', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'JVM_MEM_USED_PCT', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'LOGMNR_STATE', 'CAPTION', null, 'logmnr state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'LOGMNR_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'LOGMNR_STATE', 'DEFINITION', null, 'ora2pg_proc.logmnr_state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'LOGMNR_STATE', 'HINT', 'N', 'logmnr_state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'LOGMNR_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'LOGMNR_STATE', 'VISIBLE', null, 'Y', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_DML_WORKLOAD', 'COMMAND', null, 'PGDMLSTAT', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_DML_WORKLOAD', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_DML_WORKLOAD', 'EXPLANATION', null, 'Postgres DML statistics', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_DML_WORKLOAD', 'ICON', null, 'pg', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_DML_WORKLOAD', 'PROMPT', null, 'Postgres DML statistics', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_RE_WORKLOAD', 'COMMAND', null, 'STATS', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_RE_WORKLOAD', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_RE_WORKLOAD', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_RE_WORKLOAD', 'EXPLANATION', null, 'Replication statistics', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_RE_WORKLOAD', 'ICON', null, 'pulse', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'M_RE_WORKLOAD', 'PROMPT', 'N', 'Replication statistics', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'OTIME_MINUS_PTIME', 'CAPTION', 'N', 'otime-ptime', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'OTIME_MINUS_PTIME', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'OTIME_MINUS_PTIME', 'DEFINITION', null, 'ora2pg_proc.otime_minus_ptime', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'OTIME_MINUS_PTIME', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'OTIME_MINUS_PTIME', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'PARAMS', 'COMMAND', null, 'PROC_PAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'PARAMS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'PARAMS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'PARAMS', 'ICON', null, 'admin', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'PARAMS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'PARAMS', 'PROMPT', 'N', 'Parametres', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'PARAMS_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'PARAMS_P_XOUT', 'VALUE', null, '{F:XOUT}', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'REFRESH', 'ACTIVE', null, 'Y', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'REFRESH', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'REFRESH', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'REFRESH', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'REFRESH', 'PROC_INITIALLY', null, replace($A336962279$ApplicationProperty:XoutStatus={SQL:(XSTREAM)SELECT REPLACE(client_info,'Ora2PgSyncX ','')||':'||status||';' FROM v$session s WHERE module='XStream' and
client_info LIKE 'Ora2PgSyncX%'}$A336962279$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'REFRESH', 'PROMPT', 'N', 'Refresh', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'REFRESH', 'ROLE', null, 'TIME', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'RESPONSE', 'CAPTION', null, 'response', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'RESPONSE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'RESPONSE', 'DEFINITION', null, 'ora2pg_proc.response', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'RESPONSE', 'HINT', null, 'response on command', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'RESPONSE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS', 'COMMAND', null, 'SLOTS', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS', 'PROMPT', 'N', 'Slots', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS', 'ROLE', null, 'AUTO', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS_P_OTIME_MINUS_PTIME', 'NAME', null, 'P_OTIME_MINUS_PTIME', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS_P_OTIME_MINUS_PTIME', 'VALUE', null, '{F:OTIME_MINUS_PTIME}', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SLOTS_P_XOUT', 'VALUE', null, '{F:XOUT}', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'START_TIME', 'CAPTION', 'N', 'stat_time', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'START_TIME', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'START_TIME', 'DEFINITION', null, 'ora2pg_proc.start_time', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'START_TIME', 'GETUP', null, '', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'START_TIME', 'HINT', 'N', 'stat_time', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'START_TIME', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'START_TIME', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'STATUS', 'CAPTION', 'N', 'status', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'STATUS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'STATUS', 'DEFINITION', null, 'ora2pg_proc.status', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'STATUS', 'HINT', 'N', 'status', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'STATUS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'STATUS', 'VISUALIZATION', null, replace($A577593485$BACKGROUND(rgb({JS:if("{F:STATUS}"=="IDLE")"91,197,96";
else if ("{F:STATUS}"=="ACTIVE")"134,212,138";
else if ("{F:STATUS}"=="SEEK")"175,227,177";
else if ("{F:STATUS}"=="ERROR")"250,54,0";
else if ("{F:STATUS}"=="STOPPING")"167,217,255";
else if ("{F:STATUS}"=="STOP" || "{F:STATUS}"=="STOP_POINT")"91,185,255";
else if ("{F:STATUS}"=="ABORT")"255,186,167";
else if ("{F:STATUS}"=="PAUSE")"255,134,13";
else if ("{F:STATUS}"=="THROTTLED")"255,163,71";
else "255,255,255";}))$A577593485$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'EXPLANATION', 'Y', 'RUS:Выполнение запроса;ENG:Execute query;', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'ICON', null, 'refresh', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'PROC_INITIALLY', null, 'ApplicationProperty:LUI Timer=', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'PROMPT', 'Y', 'RUS:[ico:{Property:ICON}]{JS:if ("{FormProperty:Var Is_QBE_Mode}"=="Y")"Выполнение запроса"#$else "Обновить"#$};ENG:[ico:{Property:ICON}]{JS:if ("{FormProperty:Var Is_QBE_Mode}"=="Y")"Execute query"#$else "Refresh"#$};', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'SYSMENU$EXECUTEQUERY', 'ROLE', null, 'EXECUTEQUERY', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'WINACTIVEABLE$', 'VALUE', null, 'Y', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT', 'CAPTION', null, 'xout', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_proc.xout', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT', 'HINT', 'N', 'xout', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT', 'VISUALIZATION', null, replace($A268111011${JS:if ("{F:XS}"=="ACTIVE")"";
else if ("{F:XS}"=="INACTIVE")"BACKGROUND(rgb(255,134,13))";
else "BACKGROUND(red)";}$A268111011$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT_STATE', 'CAPTION', 'N', 'xout_state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT_STATE', 'DEFINITION', null, 'ora2pg_proc.xout_state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT_STATE', 'HINT', 'N', 'xout_state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XOUT_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XS', 'CAPTION', 'N', 'SessState', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XS', 'DEFINITION', null, 'xs.state', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XS', 'VISIBLE', null, 'Y', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', 'XS', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', null, 'HEADER', null, 'Replicator Ora2PgSyncX v {SQL:(ORA2PGSYNCX)select min(version) from {ApplicationProperty:ORA2PG_PROC}} PID: {SQL:(ORA2PGSYNCX)select min(pid) from {ApplicationProperty:ORA2PG_PROC}} Config: {SQL:(ORA2PGSYNCX)select min(config_name) from {ApplicationProperty:ORA2PG_PROC}}', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', null, 'ON_LOAD', null, 'ApplicationProperty:CheckDebug=0', null),
('ORA2PGSYNCX', 'PROC', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A986537606$select * from {ApplicationProperty:ORA2PG_PROC} ora2pg_proc
left join
(select split_part(r,':',1) code,split_part(r,':',2) state
from
regexp_split_to_Table('{ApplicationProperty:XoutStatus}',';') r
) xs
on xs.code=ora2pg_proc.xout$A986537606$,chr(13),''), null);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'PROC', 'OLR', 'RUS:OLR;', 'DEFAULT', null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'PROC', 'OLR', 'CAPTURE_STATE', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'OLR', 'LOGMNR_STATE', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'PROC', 'OLR', 'REFRESH', 'PROC_INITIALLY', null, replace($A391597634$ApplicationProperty:XoutStatus={SQL:(XSTREAM)SELECT REPLACE(client_info,'Ora2PgSyncXm ','')||':'||'ACTIVE'||';' FROM v$session s WHERE 
 module='Ora2PgSyncXm' and
client_info LIKE 'Ora2PgSyncXm%'}$A391597634$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'OLR', 'STATUS', 'VISUALIZATION', null, replace($A661449130$BACKGROUND(rgb({JS:if("{F:STATUS}"=="IDLE")"91,197,96";
else if ("{F:STATUS}"=="ACTIVE")"134,212,138";
else if ("{F:STATUS}"=="READ OLR")"134,212,138";
else if ("{F:STATUS}"=="OLR->LCR")"134,212,138";
else if ("{F:STATUS}"=="SEEK")"175,227,177";
else if ("{F:STATUS}"=="ERROR")"250,54,0";
else if ("{F:STATUS}"=="STOPPING")"167,217,255";
else if ("{F:STATUS}"=="STOP" || "{F:STATUS}"=="STOP_POINT")"91,185,255";
else if ("{F:STATUS}"=="ABORT")"255,186,167";
else if ("{F:STATUS}"=="PAUSE")"255,134,13";
else if ("{F:STATUS}"=="THROTTLED")"255,163,71";
else "255,255,255";}))$A661449130$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC', 'OLR', 'XOUT', 'CAPTION', null, 'OLR', null),
('ORA2PGSYNCX', 'PROC', 'OLR', 'XOUT_STATE', 'CAPTION', null, 'OLR_state', null);
Delete from lui_t_value where form_code='PROC_PAR' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='PROC_PAR' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='PROC_PAR' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='PROC_PAR' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'PROC_PAR', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'PROC_PAR', 'xout', null, 3),
('ORA2PGSYNCX', 'PARAM_CODE', 'ITEM', 'PROC_PAR', 'param_code', null, 4),
('ORA2PGSYNCX', 'PARAM_VALUE', 'ITEM', 'PROC_PAR', 'param_value', null, 5),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'PROC_PAR', 'xout', null, 2),
('ORA2PGSYNCX', 'PARAM_TYPE', 'ITEM', 'PROC_PAR', 'param_type', null, 7),
('ORA2PGSYNCX', 'MINV', 'ITEM', 'PROC_PAR', 'minv', null, 8),
('ORA2PGSYNCX', 'MAXV', 'ITEM', 'PROC_PAR', 'maxv', null, 9),
('ORA2PGSYNCX', 'UNIT', 'ITEM', 'PROC_PAR', 'unit', null, 6),
('ORA2PGSYNCX', 'APPLY', 'ACTION', 'PROC_PAR', 'Apply', null, 1),
('ORA2PGSYNCX', 'ERR', 'ITEM', 'PROC_PAR', 'Error', null, 10),
('ORA2PGSYNCX', 'PARAM_VALUE_BOOL', 'ACTION', 'PROC_PAR', 'Изменить', 'PARAM_VALUE', 1),
('ORA2PGSYNCX', 'PARAM_VALUE_EDIT', 'ACTION', 'PROC_PAR', 'Изменить', 'PARAM_VALUE', 2);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'Parameters', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'APPLY', 'ACTIVE', null, '{JS:if ("{ElementProperty:PARAM_VALUE.CAPTION_VISUAL}")"N";else "Y";}', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'APPLY', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'APPLY', 'BUTTON', null, 'Apply', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'APPLY', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'APPLY', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'APPLY', 'PROC_FINALLY', null, 'ApplicationProperty:CheckDebug={JS:{ApplicationProperty:CheckDebug}+1}', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'APPLY', 'PROC_INITIALLY', null, replace($A652221197$PLPGSQL:(ORA2PGSYNCX)
declare rec record;
begin
 for rec in (select split_part(r,':',1) code,split_part(r,':',2) val
from
regexp_split_to_Table('{FormProperty:Pars}',';') r) loop
 update {ApplicationProperty:ORA2PG_PROC_PAR} set param_Value=rec.val where xout={F2SQL:P_XOUT} and param_Code=rec.code;
end loop;
end;
$A652221197$||$A652221197$
SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_PROC} set command='SET_PARAMS' where xout={F2SQL:P_XOUT}
$A652221197$||$A652221197$
PLPGSQL:(ORA2PGSYNCX)
declare n int;
d text;
begin
 select param_value into d from {ApplicationProperty:ORA2PG_PROC_PAR} where xout={F2SQL:P_XOUT} and param_Code='Debug';
 if d='N' then
  fOR i IN 1..10 LOOP
  select count(*) into n from {ApplicationProperty:ORA2PG_DEBUGLOG} where xout={F2SQL:P_XOUT} and response_datetime is null;
   if n>0 then
    update {ApplicationProperty:ORA2PG_DEBUGLOG} set response_datetime=current_timestamp where xout={F2SQL:P_XOUT} and response_datetime is null;
    commit;
   else 
    exit;
   end if;
   execute pg_sleep(0.5);
  end loop;
 end if;
end;$A652221197$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'APPLY', 'PROMPT', 'N', 'Apply', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'ERR', 'CAPTION', 'N', 'Error', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'ERR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'ERR', 'DEFINITION', null, replace($A943100745$case param_type when 'boolean' then null
    else
     case when val ~ '^[0-9\.]+$' 
     then   
      case when val::bigint between minv::bigint and maxv::bigint
      then null
      else 'TEXTCOLOR(red)'
      end
     else 'TEXTCOLOR(red)'
     end
    end$A943100745$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'ERR', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MAXV', 'CAPTION', 'N', 'maxv', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MAXV', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MAXV', 'DEFINITION', null, 'ora2pg_proc_par.maxv', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MAXV', 'HINT', 'N', 'maxv', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MAXV', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MINV', 'CAPTION', 'N', 'minv', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MINV', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MINV', 'DEFINITION', null, 'ora2pg_proc_par.minv', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MINV', 'HINT', 'N', 'minv', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'MINV', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_CODE', 'CAPTION', 'N', 'param_code', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_CODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_CODE', 'DEFINITION', null, 'ora2pg_proc_par.param_code', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_CODE', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_CODE', 'HINT', 'N', 'param_code', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_CODE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_CODE', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_TYPE', 'CAPTION', 'N', 'param_type', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_TYPE', 'DEFINITION', null, 'ora2pg_proc_par.param_type', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_TYPE', 'HINT', 'N', 'param_type', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE', 'CAPTION', 'N', 'param_value', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE', 'CAPTION_VISUAL', null, replace($A220879926${SQL:select 'BACKGROUND(red)' /*{ApplicationProperty:SCN}*/
from (
select ora2pg_proc_par.xout "XOUT"
 ,ora2pg_proc_par.param_code "PARAM_CODE"
 ,pars.val "PARAM_VALUE"
 ,ora2pg_proc_par.param_type "PARAM_TYPE"
 ,ora2pg_proc_par.minv "MINV"
 ,ora2pg_proc_par.maxv "MAXV"
 ,ora2pg_proc_par.unit "UNIT"
 ,case param_type when 'boolean' then null
   else
    case when val ~ '^[0-9\.]+$'
    then  
     case when val::bigint between minv::bigint and maxv::bigint
     then null
     else 'TEXTCOLOR(red)'
     end
    else 'TEXTCOLOR(red)'
    end
   end "ERR"
from {ApplicationProperty:ORA2PG_PROC_PAR} ora2pg_proc_par,
(select split_part(r,':',1) code,split_part(r,':',2) val
from
regexp_split_to_Table('{FormProperty:Pars}',';') r
) pars
where ora2pg_proc_par.param_code=pars.code
and ora2pg_proc_par.xout='ora2pg'
)q$total where "ERR" is not null limit 1}$A220879926$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE', 'DEFINITION', null, 'pars.val', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE', 'HINT', 'N', 'param_value', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE', 'VISUALIZATION', null, '{F:ERR}', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_BOOL', 'ACTIVE', null, '{JS:if("{F:PARAM_TYPE}"=="boolean")"Y";else "N";}', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_BOOL', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_BOOL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_BOOL', 'PROC_FINALLY', null, replace($A587968667$FormProperty:Pars={SQL:(LUI$)select 
lui_f_collection('{FormProperty:Pars}',{F2SQL:PARAM_CODE},
'{JS:if ("{F:PARAM_VALUE}"=="Y")"N";else "Y";}')}$A587968667$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_BOOL', 'PROMPT', null, '{JS:if ("{Property:Value}"=="N") "ON";else "OFF";}', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_EDIT', 'ACTIVE', null, '{JS:if("{F:PARAM_TYPE}"!="boolean")"EXIST";else "N";}', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_EDIT', 'PROC_FINALLY', null, replace($A122532550$FormProperty:Pars={SQL:(LUI$)select 
lui_f_collection('{FormProperty:Pars}',{F2SQL:PARAM_CODE},{F2SQL:PARAM_VALUE})}$A122532550$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'PARAM_VALUE_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'UNIT', 'CAPTION', 'N', 'unit', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'UNIT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'UNIT', 'DEFINITION', null, 'ora2pg_proc_par.unit', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'UNIT', 'HINT', 'N', 'unit', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'UNIT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'XOUT', 'CAPTION', 'N', 'xout', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_proc_par.xout', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'XOUT', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'XOUT', 'HINT', 'N', 'xout', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', 'XOUT', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', null, 'HEADER', null, 'Parameters', null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', null, 'ON_LOAD', null, replace($A424114179$FormProperty:Pars={SQL:(ORA2PGSYNCX)select string_agg(param_code||':'||param_value||';','') from {ApplicationProperty:ORA2PG_PROC_PAR} where xout = '{F:P_XOUT}'}$A424114179$,chr(13),''), null),
('ORA2PGSYNCX', 'PROC_PAR', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A816992647$select * from {ApplicationProperty:ORA2PG_PROC_PAR} ora2pg_proc_par,
(select split_part(r,':',1) code,split_part(r,':',2) val
from
regexp_split_to_Table('{FormProperty:Pars}',';') r
) pars
where ora2pg_proc_par.param_code=pars.code
and ora2pg_proc_par.xout={F2SQL:P_XOUT}$A816992647$,chr(13),''), null);
Delete from lui_t_value where form_code='RELEASE' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='RELEASE' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='RELEASE' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='RELEASE' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'RELEASE', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'CANCEL', 'ACTION', 'RELEASE', 'ENG:Reject;RUS:Отказаться;', null, 900),
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'RELEASE', 'RUS:описание релиза;', null, 7),
('ORA2PGSYNCX', 'RELEASE_DATE', 'ITEM', 'RELEASE', 'RUS:дата и время формирования;', null, 6),
('ORA2PGSYNCX', 'RELEASE_NO', 'ITEM', 'RELEASE', 'RUS:Release No;', null, 5),
('ORA2PGSYNCX', 'P_RELEASE_ID', 'PARAM', 'RELEASE', 'RUS:Rel.ID.;ENG:Rel.ID.;', null, 1),
('ORA2PGSYNCX', 'OK', 'ACTION', 'RELEASE', 'RUS:Save;ENG:Save;', null, 3),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'RELEASE', 'RUS:Xout;ENG:Xout;', null, 4);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RUS:Settings release;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'CANCEL', 'AFTER', null, 'CANCEL', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'CANCEL', 'ICON', null, 'cancel', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'CANCEL', 'PROMPT', 'Y', 'ENG:Cancel;RUS:Отказаться;', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'CANCEL', 'QUESTION', 'Y', 'ENG:{JS:"{FormProperty:Var Changed}"==="Y"?"All changes will be lost! Close without saving?":""};RUS:{JS:"{FormProperty:Var Changed}"==="Y"?"Все изменения будут потеряны! Закрыть форму без сохранения?":""};', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'CANCEL', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'NOTES', 'CAPTION', null, 'Notes', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'NOTES', 'HINT', null, 'Release notes', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'NOTES', 'ITEM_TEMPLATE', null, 'FIELD_CHAR', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'OK', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'OK', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'OK', 'PROC_INITIALLY', null, replace($A705949648$PLPGSQL:(ORA2PGSYNCX)begin
call {ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_make_release({F2SQL:P_RELEASE_ID}::bigint,{F2SQL:XOUT}::text,{F2SQL:RELEASE_NO}::bigint,{F2SQL:RELEASE_DATE}::timestamp,{F2SQL:NOTES}::text);
end;$A705949648$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'OK', 'PROMPT', 'Y', 'RUS:Save;ENG:Save;', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'OK', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_DATE', 'CAPTION', null, 'Rel.date', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_DATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_DATE', 'DEFINITION', null, replace($A61628631${SQL:select to_char(now(),'dd.mm.yyyy hh24:mi:ss')}$A61628631$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_DATE', 'HINT', null, 'Release date and time', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_DATE', 'ITEM_TEMPLATE', null, 'FIELD_DATETIME', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_DATE', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_NO', 'CAPTION', null, 'Rel.No.', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_NO', 'CHANGING', null, 'Y', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_NO', 'DEFINITION', null, replace($A694808578${SQL:select coalesce(max(release_no+1),1) from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE} where xout='{ApplicationProperty:XOUT}' and imp_exp='e'}$A694808578$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_NO', 'HINT', null, 'Release №', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_NO', 'ITEM_TEMPLATE', null, 'FIELD_NUMBER', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'RELEASE_NO', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'XOUT', 'CAPTION', 'Y', 'RUS:Xout;ENG:Xout;', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'XOUT', 'CHANGING', null, 'N', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'XOUT', 'DEFINITION', null, '{ApplicationProperty:XOUT}', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', 'XOUT', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', null, 'HEADER', null, 'Settings release', null),
('ORA2PGSYNCX', 'RELEASE', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE} ora2pg_settings_release where release_id=0{F:P_RELEASE_ID}', null);
Delete from lui_t_value where form_code='RELEASE_DATA' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='RELEASE_DATA' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='RELEASE_DATA' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='RELEASE_DATA' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'RELEASE_DATA', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'RELEASE_NO', 'ITEM', 'RELEASE_DATA', 'RUS:id версии;', null, 2),
('ORA2PGSYNCX', 'DESTINATION', 'ITEM', 'RELEASE_DATA', 'RUS:назначение данных;', null, 3),
('ORA2PGSYNCX', 'DATA', 'ITEM', 'RELEASE_DATA', 'RUS:данные;', null, 4),
('ORA2PGSYNCX', 'P_RELEASE_NO', 'PARAM', 'RELEASE_DATA', 'RUS:Rel.No.;ENG:Rel.No.;', null, 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'RUS:Release data;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DATA', 'CAPTION', null, 'Data', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DATA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DATA', 'DEFINITION', null, 'ora2pg_settings_release_data.data', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DATA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DESTINATION', 'CAPTION', null, 'Destination', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DESTINATION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DESTINATION', 'DEFINITION', null, 'ora2pg_settings_release_data.destination', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DESTINATION', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'DESTINATION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'RELEASE_NO', 'CAPTION', null, 'release_no', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'RELEASE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'RELEASE_NO', 'DEFINITION', null, 'ora2pg_settings_release_data.release_no', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'RELEASE_NO', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'RELEASE_NO', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', 'RELEASE_NO', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', null, 'HEADER', null, 'Release data', null),
('ORA2PGSYNCX', 'RELEASE_DATA', 'DEFAULT', null, 'QUERY_TEXT', null, 'select * from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE_DATA} ora2pg_settings_release_data where release_no=0{F:P_RELEASE_NO}', null);
Delete from lui_t_value where form_code='RELEASE_IMP_SCRIPT_ROWS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='RELEASE_IMP_SCRIPT_ROWS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='RELEASE_IMP_SCRIPT_ROWS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='RELEASE_IMP_SCRIPT_ROWS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'P_RELEASE_ID', 'PARAM', 'RELEASE_IMP_SCRIPT_ROWS', 'RUS:Rel.ID.;ENG:Rel.ID.;', null, 2),
('ORA2PGSYNCX', 'DESTINATION', 'ITEM', 'RELEASE_IMP_SCRIPT_ROWS', 'RUS:destination;', null, 1),
('ORA2PGSYNCX', 'DATA', 'ITEM', 'RELEASE_IMP_SCRIPT_ROWS', 'RUS:data;', null, 3),
('ORA2PGSYNCX', 'ERROR', 'ITEM', 'RELEASE_IMP_SCRIPT_ROWS', 'RUS:error;', null, 4),
('ORA2PGSYNCX', 'RUN', 'ACTION', 'RELEASE_IMP_SCRIPT_ROWS', 'RUS:Run;ENG:Run;', null, 1),
('ORA2PGSYNCX', 'DATA_EDT', 'ACTION', 'RELEASE_IMP_SCRIPT_ROWS', 'RUS:Change;ENG:Change;', 'DATA', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'RUS:Script statements;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA', 'CAPTION', null, 'SQL', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA', 'DEFINITION', null, 'ora2pg_settings_release_script_row.data', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA', 'HINT', null, 'Statement', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA_EDT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA_EDT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_SETTINGS_RELEASE_SCRIPT}  set data={F2SQL:DATA} where release_id={F:P_RELEASE_ID} and destination={F2SQL:DESTINATION}', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA_EDT', 'PROMPT', 'Y', 'RUS:Change;ENG:Change;', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DATA_EDT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DESTINATION', 'CAPTION', null, 'destination', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DESTINATION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DESTINATION', 'DEFINITION', null, 'ora2pg_settings_release_script_row.destination', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DESTINATION', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DESTINATION', 'HINT', null, 'destination', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DESTINATION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'DESTINATION', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'CAPTION', null, 'error', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'DEFINITION', null, 'ora2pg_settings_release_script_row.error', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'HINT', null, 'error', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'RUN', 'ACTIVE', null, '{JS:if ("{F:P_CONN_INFO}")"Y";else "N"}', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'RUN', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'RUN', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'RUN', 'ICON', null, '{JS:if ("{Property:ACTIVE}"=="N")"";else "run"}', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'RUN', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'RUN', 'PROC_FINALLY', null, replace($A651483465$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_SETTINGS_RELEASE_SCRIPT}
set error=coalesce(nullif('{SQL:(XSTREAM)/*GET_SQL_ERROR*/{F:DATA}}',''),'ok') 
where release_id={F2SQL:P_RELEASE_ID} and destination={F2SQL:DESTINATION}$A651483465$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', 'RUN', 'PROMPT', 'N', 'Run', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', null, 'HEADER', null, 'Script statements', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', null, 'LINE_FEED', null, 'PRELINE', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', null, 'LINES_MAX_COUNT', null, '15', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', null, 'QUERY_TEXT', null, 'select * from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE_SCRIPT} ora2pg_settings_release_script_row where release_id={F:P_RELEASE_ID}', null),
('ORA2PGSYNCX', 'RELEASE_IMP_SCRIPT_ROWS', 'DEFAULT', null, 'START_MODE', null, 'SINGLE_ROW', null);
Delete from lui_t_value where form_code='RELEASES' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='RELEASES' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='RELEASES' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='RELEASES' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'RELEASES', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'IMPORT_DATE', 'ITEM', 'RELEASES', 'RUS:import_date;', null, 9),
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'RELEASES', 'RUS:notes;', null, 8),
('ORA2PGSYNCX', 'ADD', 'ACTION', 'RELEASES', 'RUS:add;ENG:Add;', null, 1),
('ORA2PGSYNCX', 'DEL', 'ACTION', 'RELEASES', 'RUS:Delete;ENG:Delete;', null, 3),
('ORA2PGSYNCX', 'EDIT', 'ACTION', 'RELEASES', 'RUS:Edit;ENG:Edit;', null, 2),
('ORA2PGSYNCX', 'RELEASE_DATE', 'ITEM', 'RELEASES', 'RUS:release_date;', null, 7),
('ORA2PGSYNCX', 'RELEASE_NO', 'ITEM', 'RELEASES', 'RUS:release_no;', null, 6),
('ORA2PGSYNCX', 'RELEASE_ID', 'ITEM', 'RELEASES', 'RUS:release_id;', null, 10),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'RELEASES', 'RUS:xout;', null, 5),
('ORA2PGSYNCX', 'EDIT_P_RELEASE_ID', 'PARAM', 'RELEASES', 'RUS:Rel.ID.;ENG:Rel.ID.;', 'EDIT', 1),
('ORA2PGSYNCX', 'RELEASE_NO_DOWNLOAD', 'ACTION', 'RELEASES', 'RUS:Download;ENG:Download;', 'RELEASE_NO', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RUS:Settings release;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'ADD', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'ADD', 'COMMAND', null, 'RELEASE', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'ADD', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'ADD', 'ICON', null, 'addrow', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'ADD', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'ADD', 'PROMPT', 'Y', 'ENG:[ico:{Property:ICON}]Add;RUS:[ico:{Property:ICON}]add;', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'ADD', 'ROLE', null, 'ADD', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'DEL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'DEL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'DEL', 'ICON', null, '{JS:if("{Property:ACTIVE}"=="EXIST" && 0{Property:Var CurrentRow}>0)"delrow";else "";}', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'DEL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'DEL', 'PROC_INITIALLY', null, 'SQL:delete from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE} where release_id={F:RELEASE_ID}', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'DEL', 'PROMPT', 'Y', 'ENG:[ico:{Property:ICON}]Delete;RUS:[ico:{Property:ICON}]Delete;', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'DEL', 'QUESTION', 'Y', 'ENG:Release No {F:RELEASE_NO} will be deleted.;RUS:Release No {F:RELEASE_NO} will be deleted.;', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'DEL', 'ROLE', null, 'DELETE', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT', 'COMMAND', null, 'RELEASE', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT', 'ICON', null, '{JS:if("{Property:ACTIVE}"=="EXIST" && 0{Property:Var CurrentRow}>0)"edit";else "";}', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT', 'PROMPT', 'Y', 'ENG:[ico:{Property:ICON}]Edit;RUS:[ico:{Property:ICON}]Edit;', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT_P_RELEASE_ID', 'NAME', null, 'P_RELEASE_ID', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'EDIT_P_RELEASE_ID', 'VALUE', null, '{F:RELEASE_ID}', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'IMPORT_DATE', 'CAPTION', null, 'import_date', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'IMPORT_DATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'IMPORT_DATE', 'DEFINITION', null, 'ora2pg_settings_release.import_date', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'IMPORT_DATE', 'HINT', null, 'import_date', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'IMPORT_DATE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'IMPORT_DATE', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'NOTES', 'CAPTION', null, 'notes', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'NOTES', 'DEFINITION', null, 'ora2pg_settings_release.notes', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'NOTES', 'HINT', null, 'notes', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'NOTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_DATE', 'CAPTION', null, 'release_date', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_DATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_DATE', 'DEFINITION', null, 'ora2pg_settings_release.release_date', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_DATE', 'HINT', null, 'release_date', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_DATE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_ID', 'CAPTION', null, 'release_id', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_ID', 'DEFINITION', null, 'ora2pg_settings_release.release_id', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_ID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_ID', 'HINT', null, 'release_id', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_ID', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO', 'CAPTION', null, 'release_no', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO', 'DEFINITION', null, 'ora2pg_settings_release.release_no', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO', 'FOR_UNIQUE_KEY', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO', 'HINT', null, 'release_no', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO', 'SORT', null, '-1', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO_DOWNLOAD', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO_DOWNLOAD', 'ICON', null, 'download', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO_DOWNLOAD', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO_DOWNLOAD', 'PROC_INITIALLY', null, replace($A762971374$Lob2File:select /*FOR EACH ROW*/data from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE_DATA} where release_id=0{F:RELEASE_ID} order by destination;Type:C;File:{ApplicationProperty:TmpDir}ora2pg_settings_{ApplicationProperty:XOUT}_{F:RELEASE_NO}.json;
$A762971374$||$A762971374$
URL:{ApplicationProperty:TmpDirURL}ora2pg_settings_{ApplicationProperty:XOUT}_{F:RELEASE_NO}.json$A762971374$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'RELEASE_NO_DOWNLOAD', 'PROMPT', 'Y', 'RUS:Download;ENG:Download;', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'XOUT', 'CAPTION', null, 'Xout', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_settings_release.xout', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'XOUT', 'HINT', null, 'XStream server', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', null, 'HEADER', null, 'Settings releases', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', null, 'LINE_FEED', null, 'PRELINE', null),
('ORA2PGSYNCX', 'RELEASES', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A681039666$(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE} ora2pg_settings_release
where imp_exp='e' and xout='{ApplicationProperty:XOUT}'$A681039666$,chr(13),''), null);
Delete from lui_t_value where form_code='RELEASES_IMP' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='RELEASES_IMP' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='RELEASES_IMP' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='RELEASES_IMP' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'RELEASES_IMP', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'IMPORT_DATE', 'ITEM', 'RELEASES_IMP', 'RUS:import_date;', null, 9),
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'RELEASES_IMP', 'RUS:notes;', null, 8),
('ORA2PGSYNCX', 'DEL', 'ACTION', 'RELEASES_IMP', 'RUS:Delete;ENG:Delete;', null, 3),
('ORA2PGSYNCX', 'RELEASE_DATE', 'ITEM', 'RELEASES_IMP', 'RUS:release_date;', null, 7),
('ORA2PGSYNCX', 'RELEASE_NO', 'ITEM', 'RELEASES_IMP', 'RUS:release_no;', null, 6),
('ORA2PGSYNCX', 'RELEASE_ID', 'ITEM', 'RELEASES_IMP', 'RUS:release_id;', null, 10),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'RELEASES_IMP', 'RUS:xout;', null, 5),
('ORA2PGSYNCX', 'APPLY_DATE', 'ITEM', 'RELEASES_IMP', 'RUS:дата и время применения;', null, 11),
('ORA2PGSYNCX', 'APPLY_ERROR', 'ITEM', 'RELEASES_IMP', 'RUS:ошибка применения;', null, 12),
('ORA2PGSYNCX', 'IMP', 'ACTION', 'RELEASES_IMP', 'RUS:Import settings;ENG:Import settings;', null, 4),
('ORA2PGSYNCX', 'APPLY_REPORT', 'ITEM', 'RELEASES_IMP', 'RUS:Отчёт о применении релиза;', null, 13),
('ORA2PGSYNCX', 'OVF', 'GROUP', 'RELEASES_IMP', 'RUS:Script;ENG:Scrpt;', null, 1),
('ORA2PGSYNCX', 'RELEASE_NO_APPLY', 'ACTION', 'RELEASES_IMP', 'RUS:Apply;ENG:Apply;', 'RELEASE_NO', 1),
('ORA2PGSYNCX', 'APPLY_SQL_SCRIPT', 'ITEM', 'RELEASES_IMP', 'RUS:SQL-скрип сгенерированный при применении релиза;', 'OVF', 14),
('ORA2PGSYNCX', 'APPLY_SQL_SCRIPT_SCRIPT_DOWNLOAD', 'ACTION', 'RELEASES_IMP', 'RUS:Download;ENG:Download;', 'APPLY_SQL_SCRIPT', 1),
('ORA2PGSYNCX', 'APPLY_SQL_SCRIPT_ROW', 'ACTION', 'RELEASES_IMP', 'RUS:Show statement list;ENG:Show statement list;', 'APPLY_SQL_SCRIPT', 2),
('ORA2PGSYNCX', 'ASSR_RELEASE_ID', 'PARAM', 'RELEASES_IMP', 'RUS:release_id;ENG:release_id;', 'APPLY_SQL_SCRIPT_ROW', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RUS:Imported settings release;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_DATE', 'CAPTION', null, 'Apply date', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_DATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_DATE', 'DEFINITION', null, 'ora2pg_settings_release.apply_date', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_DATE', 'HINT', null, 'дата и время применения', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_DATE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_ERROR', 'CAPTION', null, 'Apply error', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_ERROR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_ERROR', 'DEFINITION', null, 'ora2pg_settings_release.apply_error', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_ERROR', 'HINT', null, 'ошибка применения', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_ERROR', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_REPORT', 'CAPTION', null, 'Apply report', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_REPORT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_REPORT', 'DEFINITION', null, 'ora2pg_settings_release.apply_report', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_REPORT', 'HINT', null, 'Отчёт о применении релиза', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_REPORT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT', 'DEFINITION', null, 'ora2pg_settings_release.apply_sql_script', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT', 'HINT', null, 'SQL-скрип сгенерированный при применении релиза', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_ROW', 'COMMAND', null, 'RELEASE_IMP_SCRIPT_ROWS', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_ROW', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_ROW', 'ICON', null, 'script', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_ROW', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_ROW', 'PROMPT', 'Y', 'ENG:[ico:script]Show statement list;RUS:[ico:script]Show statement list;', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_SCRIPT_DOWNLOAD', 'DISPLAY', null, 'Y', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_SCRIPT_DOWNLOAD', 'ICON', null, 'download', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_SCRIPT_DOWNLOAD', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_SCRIPT_DOWNLOAD', 'PROC_INITIALLY', null, replace($A563573348$Lob2File:select apply_sql_script from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE} where release_id={F2SQL:RELEASE_ID};Type:C;File:{ApplicationProperty:TmpDir}output.sql;
$A563573348$||$A563573348$
URL:{ApplicationProperty:TmpDirURL}output.sql$A563573348$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'APPLY_SQL_SCRIPT_SCRIPT_DOWNLOAD', 'PROMPT', null, '[ico:download]Download', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'ASSR_RELEASE_ID', 'NAME', null, 'P_RELEASE_ID', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'ASSR_RELEASE_ID', 'VALUE', null, '{F:RELEASE_ID}', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'DEL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'DEL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'DEL', 'ICON', null, '{JS:if("{Property:ACTIVE}"=="EXIST" && 0{Property:Var CurrentRow}>0)"delrow";else "";}', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'DEL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'DEL', 'PROC_INITIALLY', null, 'SQL:delete from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE} where release_id={F:RELEASE_ID}', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'DEL', 'PROMPT', 'Y', 'ENG:[ico:{Property:ICON}]Delete;RUS:[ico:{Property:ICON}]Delete;', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'DEL', 'QUESTION', 'Y', 'ENG:Release No {F:RELEASE_NO} will be deleted.;RUS:Release No {F:RELEASE_NO} will be deleted.;', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'DEL', 'ROLE', null, 'DELETE', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMP', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMP', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMP', 'ICON', null, 'upload', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMP', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMP', 'PROC_INITIALLY', null, replace($A936291414$SQL:(ORA2PGSYNCX)select set_config('ORA2PG.RELEASE_ID','',false);
$A936291414$||$A936291414$
File2Lob:{UploadFile:Import settings;Multiple:N;}Type:C;SQL:select /*FOR EACH ROW*/ {ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_imp_release_row(?,'{ApplicationProperty:XOUT}');$A936291414$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMP', 'PROMPT', 'Y', 'RUS:Import settings;ENG:Import settings;', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMPORT_DATE', 'CAPTION', null, 'import_date', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMPORT_DATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMPORT_DATE', 'DEFINITION', null, 'ora2pg_settings_release.import_date', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMPORT_DATE', 'HINT', null, 'import_date', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'IMPORT_DATE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'NOTES', 'CAPTION', null, 'notes', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'NOTES', 'DEFINITION', null, 'ora2pg_settings_release.notes', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'NOTES', 'HINT', null, 'notes', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'NOTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'OVF', 'GROUP_TYPE', null, 'OVERFLOW', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'OVF', 'TITLE', null, 'Script', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_DATE', 'CAPTION', null, 'release_date', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_DATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_DATE', 'DEFINITION', null, 'ora2pg_settings_release.release_date', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_DATE', 'HINT', null, 'release_date', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_DATE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_ID', 'CAPTION', null, 'release_id', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_ID', 'DEFINITION', null, 'ora2pg_settings_release.release_id', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_ID', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_ID', 'HINT', null, 'release_id', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_ID', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO', 'CAPTION', null, 'release_no', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO', 'DEFINITION', null, 'ora2pg_settings_release.release_no', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO', 'FOR_UNIQUE_KEY', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO', 'HINT', null, 'release_no', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO', 'SORT', null, '-1', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO_APPLY', 'ACTIVE', null, replace($A484759866${JS: if ("{F:APPLY_DATE}") 
       if ("{F:APPLY_ERROR}")"EXIST";else "N";
     else "EXIST";}$A484759866$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO_APPLY', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO_APPLY', 'ICON', null, replace($A527100070${JS: if ("{F:APPLY_DATE}") 
       if ("{F:APPLY_ERROR}")"run";else "";
     else "run";}$A527100070$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO_APPLY', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO_APPLY', 'PROC_INITIALLY', null, replace($A495768386$PLPGSQL:(ORA2PGSYNCX)
declare error_text text;
begin
perform {ApplicationProperty:MAINTAIN_SCHEMA}.ora2pg_apply_release({F:RELEASE_ID});
exception when others then
GET STACKED DIAGNOSTICS error_text = MESSAGE_TEXT;
update ora2pgsyncx.ora2pg_settings_release set apply_date=now()::timestamp,apply_error=error_text where release_id={F:RELEASE_ID};
end;$A495768386$,chr(13),''), null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'RELEASE_NO_APPLY', 'PROMPT', 'Y', 'ENG:Apply release;RUS:Apply release;', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'XOUT', 'CAPTION', null, 'Xout', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_settings_release.xout', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'XOUT', 'HINT', null, 'XStream server', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', null, 'HEADER', null, 'Imported settings releases', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', null, 'LINE_FEED', null, 'PRELINE', null),
('ORA2PGSYNCX', 'RELEASES_IMP', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A210930241$(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_SETTINGS_RELEASE} ora2pg_settings_release
where imp_exp='i' and xout='{ApplicationProperty:XOUT}'$A210930241$,chr(13),''), null);
Delete from lui_t_value where form_code='REPLCATION_CONDITION' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='REPLCATION_CONDITION' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='REPLCATION_CONDITION' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='REPLCATION_CONDITION' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'P_ORA_SCHEMA', 'PARAM', 'REPLCATION_CONDITION', 'RUS:ora_schema;ENG:ora_schema;', null, 3),
('ORA2PGSYNCX', 'P_ORA_TABLE', 'PARAM', 'REPLCATION_CONDITION', 'RUS:ora_table;ENG:ora_table;', null, 4),
('ORA2PGSYNCX', 'CONDITION', 'ITEM', 'REPLCATION_CONDITION', 'RUS:Replicaton condition;ENG:Replication condtion;', null, 1),
('ORA2PGSYNCX', 'COLS', 'ACTION', 'REPLCATION_CONDITION', 'RUS:Columns;ENG:Columns;', null, 6),
('ORA2PGSYNCX', 'USER_CONSTANTS', 'ACTION', 'REPLCATION_CONDITION', 'RUS:User-defined;ENG:User-defned;', null, 10),
('ORA2PGSYNCX', 'CONSTANTS', 'ACTION', 'REPLCATION_CONDITION', 'RUS:Constants;ENG:Constants;', null, 9),
('ORA2PGSYNCX', 'OPERATORS', 'ACTION', 'REPLCATION_CONDITION', 'RUS:Operators;ENG:Operators;', null, 8),
('ORA2PGSYNCX', 'FUNCTIONS', 'ACTION', 'REPLCATION_CONDITION', 'RUS:Functions;ENG:Functions;', null, 7),
('ORA2PGSYNCX', 'ON_BOT', 'GROUP', 'REPLCATION_CONDITION', 'RUS:BOTTOM;ENG:BOTTOM;', null, 2),
('ORA2PGSYNCX', 'COLS_P_ORA_SCHEMA', 'PARAM', 'REPLCATION_CONDITION', 'RUS:ora_schema;ENG:ora_schema;', 'COLS', 1),
('ORA2PGSYNCX', 'COLS_P_ORA_TABLE', 'PARAM', 'REPLCATION_CONDITION', 'RUS:ora_table;ENG:ora_table;', 'COLS', 2),
('ORA2PGSYNCX', 'CONSTANTS_P_CATEGORY', 'PARAM', 'REPLCATION_CONDITION', 'RUS:Category;ENG:Category;', 'CONSTANTS', 1),
('ORA2PGSYNCX', 'CONSTANTS_P_ENGINE', 'PARAM', 'REPLCATION_CONDITION', 'RUS:Engine;ENG:Engine;', 'CONSTANTS', 2),
('ORA2PGSYNCX', 'OPERATORS_P_CATEGORY', 'PARAM', 'REPLCATION_CONDITION', 'RUS:Category;ENG:Category;', 'OPERATORS', 1),
('ORA2PGSYNCX', 'OPERATORS_P_ENGINE', 'PARAM', 'REPLCATION_CONDITION', 'RUS:Engine;ENG:Engine;', 'OPERATORS', 2),
('ORA2PGSYNCX', 'FUNCTIONS_P_CATEGORY', 'PARAM', 'REPLCATION_CONDITION', 'RUS:Category;ENG:Category;', 'FUNCTIONS', 1),
('ORA2PGSYNCX', 'FUNCTIONS_P_ENGINE', 'PARAM', 'REPLCATION_CONDITION', 'RUS:Engine;ENG:Engine;', 'FUNCTIONS', 2),
('ORA2PGSYNCX', 'OK', 'ACTION', 'REPLCATION_CONDITION', 'RUS:Apply;ENG:Save;', 'ON_BOT', 5),
('ORA2PGSYNCX', 'CANCEL', 'ACTION', 'REPLCATION_CONDITION', 'ENG:Reject;RUS:Отказаться;', 'ON_BOT', 900),
('ORA2PGSYNCX', 'ENGINE', 'ITEM', 'REPLCATION_CONDITION', 'RUS:Engine;ENG:Engine;', 'ON_BOT', 1),
('ORA2PGSYNCX', 'ON_BOT_FIX', 'GROUP', 'REPLCATION_CONDITION', 'RUS:Fix;ENG:Fix;', 'ON_BOT', 2),
('ORA2PGSYNCX', 'ON_BOT_FIX2', 'GROUP', 'REPLCATION_CONDITION', 'RUS:Fix2;ENG:Fix2;', 'ON_BOT', 3);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'RUS:Replcation condtion;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CANCEL', 'AFTER', null, 'CANCEL', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CANCEL', 'ICON', null, 'cancel', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CANCEL', 'PROMPT', 'Y', 'RUS:Cancel;ENG:Cancel;', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CANCEL', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CANCEL', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS', 'COMMAND', null, 'FORMULA_COLS', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS', 'ROLE', null, 'AUTOTABRIGHT', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS_P_ORA_SCHEMA', 'NAME', null, 'P_ORA_SCHEMA', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS_P_ORA_SCHEMA', 'VALUE', null, '{F:P_ORA_SCHEMA}', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS_P_ORA_TABLE', 'NAME', null, 'P_ORA_TABLE', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'COLS_P_ORA_TABLE', 'VALUE', null, '{F:P_ORA_TABLE}', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONDITION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONDITION', 'DEFINITION', null, '{SQL:(ORA2PGSYNCX)select condition from {ApplicationProperty:ORA2PG_TAB}  where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}}', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONDITION', 'VISIBLE', null, '8/9', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONDITION', 'VISUALIZATION', null, '{JS:if ("{F:ENGINE}"=="sql")".sql";else ".JavaScript";}', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONSTANTS', 'COMMAND', null, 'FORMULA_EVALEX_ITEMS', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONSTANTS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONSTANTS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONSTANTS', 'ROLE', null, 'AUTOTABRIGHT', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONSTANTS', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONSTANTS_P_CATEGORY', 'NAME', null, 'P_CATEGORY', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONSTANTS_P_CATEGORY', 'VALUE', null, 'Constant', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'CONSTANTS_P_ENGINE', 'NAME', null, 'P_ENGINE', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'ENGINE', 'CAPTION', 'Y', 'RUS:Engine;ENG:Engine;', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'ENGINE', 'CHANGING', null, 'C', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'ENGINE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'ENGINE', 'DEFINITION', null, replace($A768820177${SQL:(ORA2PGSYNCX)select coalesce(condition_engine,'EvalEx') from {ApplicationProperty:ORA2PG_TAB}  where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE}}$A768820177$,chr(13),''), null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'ENGINE', 'VARIANTS', null, 'LOVD:EvalEx:EvalEx;JavaScript:Rhino JavaScrpt;', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS', 'COMMAND', null, 'FORMULA_EVALEX_ITEMS', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS', 'ROLE', null, 'AUTOTABRIGHT', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS_P_CATEGORY', 'NAME', null, 'P_CATEGORY', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS_P_CATEGORY', 'VALUE', null, 'Function', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS_P_ENGINE', 'NAME', null, 'P_ENGINE', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'FUNCTIONS_P_ENGINE', 'VALUE', null, '{F:ENGINE}', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OK', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OK', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OK', 'PROC_INITIALLY', null, replace($A650235228$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_TAB} set condition={F2SQL:CONDITION} , condition_binds=null, condition_error=null,condition_engine={F2SQL:ENGINE}
where ora_schema={F2SQL:P_ORA_SCHEMA} and ora_table={F2SQL:P_ORA_TABLE} 
and( condition is distinct from {F2SQL:CONDITION} or condition_engine is distinct from {F2SQL:ENGINE})$A650235228$,chr(13),''), null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OK', 'PROMPT', 'Y', 'RUS:Apply;ENG:Save;', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OK', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'ON_BOT', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'ON_BOT_FIX', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'ON_BOT_FIX2', 'GROUP_TYPE', null, 'SIDE_BY_SIDE', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS', 'COMMAND', null, 'FORMULA_EVALEX_ITEMS', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS', 'ROLE', null, 'AUTOTABRIGHT', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS', 'VERIFICATION', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS_P_CATEGORY', 'NAME', null, 'P_CATEGORY', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS_P_CATEGORY', 'VALUE', null, 'Operator', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS_P_ENGINE', 'NAME', null, 'P_ENGINE', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'OPERATORS_P_ENGINE', 'VALUE', null, '{F:ENGINE}', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'USER_CONSTANTS', 'COMMAND', null, 'FORMULA_EVALEX_ITEMS_U', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'USER_CONSTANTS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'USER_CONSTANTS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'USER_CONSTANTS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'USER_CONSTANTS', 'PROMPT', 'Y', 'RUS:User-defined;ENG:User-defned;', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', 'USER_CONSTANTS', 'ROLE', null, 'AUTOTABRIGHT', null),
('ORA2PGSYNCX', 'REPLCATION_CONDITION', 'DEFAULT', null, 'HEADER', null, 'Replcation condtion for {F:P_ORA_SCHEMA}.{F:P_ORA_TABLE}', null);
Delete from lui_t_value where form_code='SCRIPT_ROW' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='SCRIPT_ROW' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='SCRIPT_ROW' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='SCRIPT_ROW' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'SCRIPT_ROW', 'BLANK', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'CANCEL', 'ACTION', 'SCRIPT_ROW', 'ENG:Reject;RUS:Отказаться;', null, 900),
('ORA2PGSYNCX', 'OK', 'ACTION', 'SCRIPT_ROW', 'RUS:Save;ENG:Save;', null, 5),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'SCRIPT_ROW', 'RUS:xout;ENG:xout;', null, 2),
('ORA2PGSYNCX', 'P_DEST', 'PARAM', 'SCRIPT_ROW', 'RUS:Destination;ENG:Destination;', null, 3),
('ORA2PGSYNCX', 'P_ROWN', 'PARAM', 'SCRIPT_ROW', 'RUS:Row N;ENG:Row N;', null, 4),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'ITEM', 'SCRIPT_ROW', 'RUS:script_row;ENG:script_row;', null, 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'RUS:Script Row;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'CANCEL', 'AFTER', null, 'CANCEL', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'CANCEL', 'ICON', null, 'cancel', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'CANCEL', 'PROMPT', 'Y', 'ENG:Cancel;RUS:Отказаться;', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'CANCEL', 'QUESTION', 'Y', 'ENG:{JS:"{FormProperty:Var Changed}"==="Y"?"All changes will be lost! Close without saving?":""};RUS:{JS:"{FormProperty:Var Changed}"==="Y"?"Все изменения будут потеряны! Закрыть форму без сохранения?":""};', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'CANCEL', 'ROLE', null, 'CLOSE', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'OK', 'AFTER', null, 'EXIT', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'OK', 'ICON', null, 'ok', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'OK', 'PROC_INITIALLY', null, replace($A655581148$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_SCRIPT_ROWS} set script_row={F2SQL:SCRIPT_ROW} 
where xout={F2SQL:P_XOUT} and destination={F2SQL:P_DEST} and rown={F:P_ROWN}$A655581148$,chr(13),''), null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'OK', 'PROMPT', 'Y', 'RUS:Save;ENG:Save;', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'OK', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'SCRIPT_ROW', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'SCRIPT_ROW', 'OPTIONAL', null, 'N', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'SCRIPT_ROW', 'VISIBLE', null, '9/10', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', 'SCRIPT_ROW', 'VISUALIZATION', null, '.sql', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', null, 'HEADER', null, 'Script Row', null),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select SCRIPT_ROW from {ApplicationProperty:ORA2PG_SCRIPT_ROWS} ora2pg_script_rows where xout={F2SQL:P_XOUT} and destination={F2SQL:P_DEST} and rown={F:P_ROWN}', null);
Delete from lui_t_value where form_code='SCRIPT_ROWS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='SCRIPT_ROWS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='SCRIPT_ROWS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='SCRIPT_ROWS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'EDIT', 'ACTION', 'SCRIPT_ROWS', 'RUS:Edit;ENG:Edit;', null, 2),
('ORA2PGSYNCX', 'SCRIPT_ROW', 'ITEM', 'SCRIPT_ROWS', 'script_row', null, 7),
('ORA2PGSYNCX', 'ROWN', 'ITEM', 'SCRIPT_ROWS', 'rown', null, 6),
('ORA2PGSYNCX', 'ERROR', 'ITEM', 'SCRIPT_ROWS', 'error', null, 8),
('ORA2PGSYNCX', 'P_DEST', 'PARAM', 'SCRIPT_ROWS', 'Destination', null, 4),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'SCRIPT_ROWS', 'xout', null, 3),
('ORA2PGSYNCX', 'RUN', 'ACTION', 'SCRIPT_ROWS', 'Run', null, 1),
('ORA2PGSYNCX', 'P_CONN_INFO', 'PARAM', 'SCRIPT_ROWS', 'Connect Info', null, 5),
('ORA2PGSYNCX', 'EDIT_P_XOUT', 'PARAM', 'SCRIPT_ROWS', 'RUS:xout;ENG:xout;', 'EDIT', 1),
('ORA2PGSYNCX', 'EDIT_P_DEST', 'PARAM', 'SCRIPT_ROWS', 'RUS:Destination;ENG:Destination;', 'EDIT', 2),
('ORA2PGSYNCX', 'EDIT_P_ROWN', 'PARAM', 'SCRIPT_ROWS', 'RUS:Row N;ENG:Row N;', 'EDIT', 3);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'Script rows', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'ACTIVE', null, 'Y', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'APPLY_TO', null, 'N', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'COMMAND', null, 'SCRIPT_ROW', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'ICON', null, '{JS:if("{Property:ACTIVE}"=="Y" && 0{Property:Var CurrentRow}>0)"edit";else "";}', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'PROMPT', 'Y', 'ENG:[ico:{Property:ICON}]Edit;RUS:[ico:{Property:ICON}]Edit;', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT', 'ROLE', null, 'DBLCLICK', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT_P_DEST', 'NAME', null, 'P_DEST', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT_P_DEST', 'VALUE', null, '{F:P_DEST}', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT_P_ROWN', 'NAME', null, 'P_ROWN', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT_P_ROWN', 'VALUE', null, '{F:ROWN}', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'EDIT_P_XOUT', 'VALUE', null, '{F:P_XOUT}', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'CAPTION', 'N', 'error', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'DEFINITION', null, 'ora2pg_script_rows.error', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'HINT', 'N', 'error', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ERROR', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'P_CONN_INFO', 'VALUE', null, '{SQL:(ORA2PGSYNCX)select conn_info from {ApplicationProperty:ORA2PG_SCRIPTS} where xout={F2SQL:P_XOUT} and destination={F2SQL:P_DEST}}', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ROWN', 'CAPTION', 'N', 'rown', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ROWN', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ROWN', 'DEFINITION', null, 'ora2pg_script_rows.rown', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ROWN', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ROWN', 'HINT', 'N', 'rown', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ROWN', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'ROWN', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'RUN', 'ACTIVE', null, '{JS:if ("{F:P_CONN_INFO}")"Y";else "N"}', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'RUN', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'RUN', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'RUN', 'ICON', null, '{JS:if ("{Property:ACTIVE}"=="N")"";else "run"}', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'RUN', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'RUN', 'PROC_FINALLY', null, replace($A834088356$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_SCRIPT_ROWS} 
set error=coalesce(nullif('{SQL:(XSTREAM)/*GET_SQL_ERROR*/{F:SCRIPT_ROW}}',''),'ok') 
where xout={F2SQL:P_XOUT} and destination={F2SQL:P_DEST}
and rown={F2SQL:ROWN}$A834088356$,chr(13),''), null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'RUN', 'PROMPT', 'N', 'Run', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'SCRIPT_ROW', 'CAPTION', 'N', 'script_row', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'SCRIPT_ROW', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'SCRIPT_ROW', 'DEFINITION', null, 'ora2pg_script_rows.script_row', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'SCRIPT_ROW', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'SCRIPT_ROW', 'HINT', 'N', 'script_row', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', 'SCRIPT_ROW', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', null, 'HEADER', null, 'Script rows', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', null, 'LINE_FEED', null, 'PRELINE', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', null, 'LINES_MAX_COUNT', null, '20', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_SCRIPT_ROWS} ora2pg_script_rows where xout={F2SQL:P_XOUT} and destination={F2SQL:P_DEST}', null),
('ORA2PGSYNCX', 'SCRIPT_ROWS', 'DEFAULT', null, 'START_MODE', null, 'MULTI_ROW', null);
Delete from lui_t_value where form_code='SCRIPTS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='SCRIPTS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='SCRIPTS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='SCRIPTS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'SCRIPTS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'ROWS', 'ACTION', 'SCRIPTS', 'Rows', null, 1),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'SCRIPTS', 'xout', null, 2),
('ORA2PGSYNCX', 'DESTINATION', 'ITEM', 'SCRIPTS', 'destination', null, 3),
('ORA2PGSYNCX', 'CONN_INFO', 'ITEM', 'SCRIPTS', 'conn_info', null, 5),
('ORA2PGSYNCX', 'ROWS_P_XOUT', 'PARAM', 'SCRIPTS', 'xout', 'ROWS', 1),
('ORA2PGSYNCX', 'ROWS_P_DEST', 'PARAM', 'SCRIPTS', 'Destination', 'ROWS', 2),
('ORA2PGSYNCX', 'SCRIPT_DOWNLOAD', 'ACTION', 'SCRIPTS', 'Download', 'DESTINATION', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'Scripts', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'CONN_INFO', 'CAPTION', 'N', 'conn_info', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'CONN_INFO', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'CONN_INFO', 'DEFINITION', null, 'ora2pg_scripts.conn_info', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'CONN_INFO', 'HINT', 'N', 'conn_info', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'CONN_INFO', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'CONN_INFO', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'DESTINATION', 'CAPTION', 'N', 'destination', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'DESTINATION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'DESTINATION', 'DEFINITION', null, 'ora2pg_scripts.destination', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'DESTINATION', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'DESTINATION', 'HINT', 'N', 'destination', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'DESTINATION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'DESTINATION', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS', 'COMMAND', null, 'SCRIPT_ROWS', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS', 'PROMPT', 'N', 'Rows', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS', 'ROLE', null, 'AUTOBOTTOM', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS_P_DEST', 'NAME', null, 'P_DEST', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS_P_DEST', 'VALUE', null, '{F:DESTINATION}', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'ROWS_P_XOUT', 'VALUE', null, '{F:XOUT}', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'SCRIPT_DOWNLOAD', 'DISPLAY', null, 'Y', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'SCRIPT_DOWNLOAD', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'SCRIPT_DOWNLOAD', 'PROC_INITIALLY', null, replace($A436000441$Lob2File:select script from {ApplicationProperty:ORA2PG_SCRIPTS} where xout={F2SQL:XOUT} and destination={F2SQL:DESTINATION};Type:C;File:{ApplicationProperty:TmpDir}output.sql;
$A436000441$||$A436000441$
URL:{ApplicationProperty:TmpDirURL}output.sql$A436000441$,chr(13),''), null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'SCRIPT_DOWNLOAD', 'PROMPT', null, '[ico:download]Download', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'XOUT', 'CAPTION', 'N', 'xout', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_scripts.xout', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'XOUT', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'XOUT', 'HINT', 'N', 'xout', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', 'XOUT', 'VISIBLE', null, 'Y', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', null, 'HEADER', null, 'Scripts', null),
('ORA2PGSYNCX', 'SCRIPTS', 'DEFAULT', null, 'QUERY_TEXT', null, 'select * from {ApplicationProperty:ORA2PG_SCRIPTS} ora2pg_scripts', null);
Delete from lui_t_value where form_code='SEQUENCES' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='SEQUENCES' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='SEQUENCES' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='SEQUENCES' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'SEQUENCES', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'ORA', 'GROUP', 'SEQUENCES', 'RUS:Oracle;ENG:Oracle;', null, 2),
('ORA2PGSYNCX', 'PG', 'GROUP', 'SEQUENCES', 'RUS:Pg;ENG:Pg;', null, 3),
('ORA2PGSYNCX', 'DATESTAMP', 'ITEM', 'SEQUENCES', 'RUS:datestamp;', null, 16),
('ORA2PGSYNCX', 'PROBLEM', 'ITEM', 'SEQUENCES', 'RUS:problem;', null, 17),
('ORA2PGSYNCX', 'WARNING', 'ITEM', 'SEQUENCES', 'RUS:warning;', null, 18),
('ORA2PGSYNCX', 'EXCLUDE', 'ITEM', 'SEQUENCES', 'RUS:exclude;', null, 19),
('ORA2PGSYNCX', 'SQL4SET', 'ITEM', 'SEQUENCES', 'RUS:sql4set;', null, 20),
('ORA2PGSYNCX', 'ERR', 'ITEM', 'SEQUENCES', 'RUS:err;', null, 21),
('ORA2PGSYNCX', 'DATEORA2PG', 'ITEM', 'SEQUENCES', 'RUS:dateora2pg;', null, 22),
('ORA2PGSYNCX', 'DEL', 'ACTION', 'SEQUENCES', 'RUS:Удалить;ENG:Delete;', null, 1),
('ORA2PGSYNCX', 'ORA_SCHEMA', 'ITEM', 'SEQUENCES', 'RUS:ora_schema;', 'ORA', 2),
('ORA2PGSYNCX', 'ORA_SEQUENCE', 'ITEM', 'SEQUENCES', 'RUS:ora_sequence;', 'ORA', 3),
('ORA2PGSYNCX', 'ORA_LAST_VALUE', 'ITEM', 'SEQUENCES', 'RUS:ora_last_value;', 'ORA', 4),
('ORA2PGSYNCX', 'ORA_MAX_VALUE', 'ITEM', 'SEQUENCES', 'RUS:ora_max_value;', 'ORA', 5),
('ORA2PGSYNCX', 'ORA_MIN_VALUE', 'ITEM', 'SEQUENCES', 'RUS:ora_min_value;', 'ORA', 6),
('ORA2PGSYNCX', 'ORA_INCR', 'ITEM', 'SEQUENCES', 'RUS:ora_incr;', 'ORA', 7),
('ORA2PGSYNCX', 'ORA_CCH', 'ITEM', 'SEQUENCES', 'RUS:ora_cch;', 'ORA', 8),
('ORA2PGSYNCX', 'PG_SCHEMA', 'ITEM', 'SEQUENCES', 'RUS:pg_schema;', 'PG', 9),
('ORA2PGSYNCX', 'PG_SEQUENCE', 'ITEM', 'SEQUENCES', 'RUS:pg_sequence;', 'PG', 10),
('ORA2PGSYNCX', 'PG_LAST_VALUE', 'ITEM', 'SEQUENCES', 'RUS:pg_last_value;', 'PG', 11),
('ORA2PGSYNCX', 'PG_MAX_VALUE', 'ITEM', 'SEQUENCES', 'RUS:pg_max_value;', 'PG', 12),
('ORA2PGSYNCX', 'PG_MIN_VALUE', 'ITEM', 'SEQUENCES', 'RUS:pg_min_value;', 'PG', 13),
('ORA2PGSYNCX', 'PG_INCR', 'ITEM', 'SEQUENCES', 'RUS:pg_incr;', 'PG', 14),
('ORA2PGSYNCX', 'PG_CCH', 'ITEM', 'SEQUENCES', 'RUS:pg_cch;', 'PG', 15),
('ORA2PGSYNCX', 'PROBLEM_EDIT', 'ACTION', 'SEQUENCES', 'RUS:change;ENG:change;', 'PROBLEM', 1),
('ORA2PGSYNCX', 'EXC', 'ACTION', 'SEQUENCES', 'exclude', 'EXCLUDE', 1),
('ORA2PGSYNCX', 'EXCLUDE_EDIT', 'ACTION', 'SEQUENCES', 'Изменить', 'EXCLUDE', 3),
('ORA2PGSYNCX', 'INC', 'ACTION', 'SEQUENCES', 'include', 'EXCLUDE', 2),
('ORA2PGSYNCX', 'PG_SCHEMA_EDIT', 'ACTION', 'SEQUENCES', 'Изменить', 'PG_SCHEMA', 1),
('ORA2PGSYNCX', 'PG_SEQUENCE_EDIT', 'ACTION', 'SEQUENCES', 'RUS:Изменить;ENG:Change;', 'PG_SEQUENCE', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'Sequences', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATEORA2PG', 'CAPTION', null, 'dateora2pg', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATEORA2PG', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATEORA2PG', 'DEFINITION', null, 'ora2pg_seq.dateora2pg', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATEORA2PG', 'HINT', null, 'dateora2pg', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATEORA2PG', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATESTAMP', 'CAPTION', null, 'datestamp', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATESTAMP', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATESTAMP', 'DEFINITION', null, 'ora2pg_seq.datestamp', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATESTAMP', 'HINT', null, 'datestamp', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DATESTAMP', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'ICON', null, 'delrow', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)delete from {ApplicationProperty:ORA2PG_SEQ} where ora_schema={F2SQL:ORA_SCHEMA} and ora_sequence={F2SQL:ORA_SEQUENCE};', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'PROMPT', 'Y', 'RUS:Delete table definition;ENG:Delete;', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'QUESTION', null, replace($A964342017${JS:if ("{FormProperty:SelectionMode}" == "Single") "Definition for sequence {F:ORA_SCHEMA}.{F:ORA_SEQUENCE} will be deleted."
else "Definitions for {FormProperty:CountSelected} sequences will be deleted."}$A964342017$,chr(13),''), null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'DEL', 'ROLE', null, 'DELETE', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ERR', 'CAPTION', null, 'err', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ERR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ERR', 'DEFINITION', null, 'ora2pg_seq.err', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ERR', 'HINT', null, 'err', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ERR', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXC', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXC', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXC', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXC', 'ICON', null, '', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXC', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXC', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXC', 'PROC_INITIALLY', null, replace($A25509425$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_SEQ}  set exclude='Y' where ora_schema={F2SQL:ORA_SCHEMA} and ora_sequence={F2SQL:ORA_SEQUENCE}$A25509425$,chr(13),''), null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXC', 'PROMPT', null, '[ico:cancel]exclude', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE', 'CAPTION', null, 'exclude', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE', 'CAPTION_VISUAL', null, replace($A245257785${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_SEQ} where exclude is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A245257785$,chr(13),''), null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE', 'DEFINITION', null, 'ora2pg_seq.exclude', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE', 'HINT', null, 'exclude', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE', 'VISUALIZATION', null, '{JS:"{Property:Value}"?"BACKGROUND(yellow)":""}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE_EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE_EDIT', 'PROC_INITIALLY', null, replace($A870212853$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_SEQ}  set exclude={F2SQL:EXCLUDE} where ora_schema={F2SQL:ORA_SCHEMA} 
and ora_sequence={F2SQL:ORA_SEQUENCE}$A870212853$,chr(13),''), null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'EXCLUDE_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'INC', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'INC', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'INC', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'INC', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'INC', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'INC', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_SEQ}  set exclude=null where ora_schema={F2SQL:ORA_SCHEMA} and ora_sequence={F2SQL:ORA_SEQUENCE}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'INC', 'PROMPT', null, '[ico:addrow]include', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA', 'TITLE', null, 'Oracle', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_CCH', 'CAPTION', null, 'cache', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_CCH', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_CCH', 'DEFINITION', null, 'ora2pg_seq.ora_cch', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_CCH', 'HINT', null, 'ora_cch', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_CCH', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_INCR', 'CAPTION', null, 'increment', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_INCR', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_INCR', 'DEFINITION', null, 'ora2pg_seq.ora_incr', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_INCR', 'HINT', null, 'ora_incr', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_INCR', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_LAST_VALUE', 'CAPTION', null, 'last_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_LAST_VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_LAST_VALUE', 'DEFINITION', null, 'ora2pg_seq.ora_last_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_LAST_VALUE', 'FORMAT', null, 'FM999G999G999G999G999G999G999G999G999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_LAST_VALUE', 'HINT', null, 'ora_last_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_LAST_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MAX_VALUE', 'CAPTION', null, 'max_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MAX_VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MAX_VALUE', 'DEFINITION', null, 'ora2pg_seq.ora_max_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MAX_VALUE', 'FORMAT', null, 'FM999G999G999G999G999G999G999G999G999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MAX_VALUE', 'HINT', null, 'ora_max_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MAX_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MIN_VALUE', 'CAPTION', null, 'min_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MIN_VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MIN_VALUE', 'DEFINITION', null, 'ora2pg_seq.ora_min_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MIN_VALUE', 'HINT', null, 'ora_min_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_MIN_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SCHEMA', 'CAPTION', null, 'schema', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SCHEMA', 'DEFINITION', null, 'ora2pg_seq.ora_schema', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SCHEMA', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SCHEMA', 'HINT', null, 'ora_schema', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SEQUENCE', 'CAPTION', null, 'sequence', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SEQUENCE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SEQUENCE', 'DEFINITION', null, 'ora2pg_seq.ora_sequence', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SEQUENCE', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SEQUENCE', 'HINT', null, 'ora_sequence', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'ORA_SEQUENCE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG', 'TITLE', null, 'Postgres', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_CCH', 'CAPTION', null, 'cache', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_CCH', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_CCH', 'DEFINITION', null, 'ora2pg_seq.pg_cch', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_CCH', 'HINT', null, 'pg_cch', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_CCH', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_INCR', 'CAPTION', null, 'increment', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_INCR', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_INCR', 'DEFINITION', null, 'ora2pg_seq.pg_incr', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_INCR', 'HINT', null, 'pg_incr', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_INCR', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_LAST_VALUE', 'CAPTION', null, 'last_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_LAST_VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_LAST_VALUE', 'DEFINITION', null, 'ora2pg_seq.pg_last_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_LAST_VALUE', 'FORMAT', null, 'FM999G999G999G999G999G999G999G999G999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_LAST_VALUE', 'HINT', null, 'pg_last_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_LAST_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MAX_VALUE', 'CAPTION', null, 'max_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MAX_VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MAX_VALUE', 'DEFINITION', null, 'ora2pg_seq.pg_max_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MAX_VALUE', 'FORMAT', null, 'FM999G999G999G999G999G999G999G999G999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MAX_VALUE', 'HINT', null, 'pg_max_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MAX_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MIN_VALUE', 'CAPTION', null, 'min_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MIN_VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MIN_VALUE', 'DEFINITION', null, 'ora2pg_seq.pg_min_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MIN_VALUE', 'HINT', null, 'pg_min_value', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_MIN_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA', 'CAPTION', null, 'schema', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA', 'DEFINITION', null, 'ora2pg_seq.pg_schema', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA', 'HINT', null, 'pg_schema', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'PROC_INITIALLY', null, replace($A197194690$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_SEQ}  set pg_schema={F2SQL:PG_SCHEMA} where ora_schema={F2SQL:ORA_SCHEMA} 
and ora_sequence={F2SQL:ORA_SEQUENCE}$A197194690$,chr(13),''), null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE', 'CAPTION', null, 'sequence', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE', 'DEFINITION', null, 'ora2pg_seq.pg_sequence', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE', 'HINT', null, 'pg_sequence', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE_EDIT', 'PROC_INITIALLY', null, replace($A735612460$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_SEQ}  set pg_sequence={F2SQL:PG_SEQUENCE} where ora_schema={F2SQL:ORA_SCHEMA} 
and ora_sequence={F2SQL:ORA_SEQUENCE}$A735612460$,chr(13),''), null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PG_SEQUENCE_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM', 'CAPTION', null, 'problem', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM', 'CAPTION_VISUAL', null, replace($A310461309${SQL:(ORA2PGSYNCX)select 'TEXTCOLOR(red)' from {ApplicationProperty:ORA2PG_SEQ} where problem is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A310461309$,chr(13),''), null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM', 'DEFINITION', null, 'ora2pg_seq.problem', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM', 'HINT', null, 'problem', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM', 'VISUALIZATION', null, 'TEXTCOLOR(red)', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM_EDIT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_SEQ}  set problem={F2SQL:PROBLEM} where ora_schema={F2SQL:ORA_SCHEMA} and ora_sequence={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'PROBLEM_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'SQL4SET', 'CAPTION', null, 'sql4set', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'SQL4SET', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'SQL4SET', 'DEFINITION', null, 'ora2pg_seq.sql4set', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'SQL4SET', 'HINT', null, 'sql4set', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'SQL4SET', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'WARNING', 'CAPTION', null, 'warning', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'WARNING', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'WARNING', 'DEFINITION', null, 'ora2pg_seq.warning', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'WARNING', 'HINT', null, 'warning', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', 'WARNING', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', null, 'HEADER', null, 'Sequences', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', null, 'LINE_FEED', null, 'WRAP', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_SEQ} ora2pg_seq', null),
('ORA2PGSYNCX', 'SEQUENCES', 'DEFAULT', null, 'START_MODE', null, 'SINGLE_ROW', null);
Delete from lui_t_value where form_code='SLOTS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='SLOTS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='SLOTS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='SLOTS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'SLOTS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'IN', 'GROUP', 'SLOTS', 'incoming', null, 8),
('ORA2PGSYNCX', 'Q', 'GROUP', 'SLOTS', 'Q', null, 12),
('ORA2PGSYNCX', 'OUT', 'GROUP', 'SLOTS', 'out', null, 16),
('ORA2PGSYNCX', 'EXECUTEBATCHDURATION', 'ITEM', 'SLOTS', 'RUS:ExBatchDur;ENG:ExBatchDur;', null, 25),
('ORA2PGSYNCX', 'DISCARD', 'GROUP', 'SLOTS', 'RUS:discard;ENG:discard;', null, 21),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'SLOTS', 'xout', null, 28),
('ORA2PGSYNCX', 'REFRESH', 'ACTION', 'SLOTS', 'Refresh', null, 2),
('ORA2PGSYNCX', 'LASTCOMMITSCN', 'ITEM', 'SLOTS', 'lastcommitscn', null, 22),
('ORA2PGSYNCX', 'LASTCOMMITORIGINALDATE', 'ITEM', 'SLOTS', 'lastcommitoriginaldate', null, 27),
('ORA2PGSYNCX', 'STATUS', 'ITEM', 'SLOTS', 'status', null, 6),
('ORA2PGSYNCX', 'SLOT_NAME', 'ITEM', 'SLOTS', 'slot_name', null, 1),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'SLOTS', 'xout', null, 4),
('ORA2PGSYNCX', 'OVF', 'GROUP', 'SLOTS', 'OVF', null, 26),
('ORA2PGSYNCX', 'LAG', 'ITEM', 'SLOTS', 'RUS:Lag;', null, 23),
('ORA2PGSYNCX', 'PRETTY', 'ACTION', 'SLOTS', 'Pretty format', null, 3),
('ORA2PGSYNCX', 'REPEAT_MODE', 'ITEM', 'SLOTS', 'repeat_mode', null, 7),
('ORA2PGSYNCX', 'RATE_OUT_BYTES', 'ITEM', 'SLOTS', 'out_bytes_rate', null, 24),
('ORA2PGSYNCX', 'P_OTIME_MINUS_PTIME', 'PARAM', 'SLOTS', 'otime-ptime', null, 5),
('ORA2PGSYNCX', 'SEEK_LAG_SCN', 'ITEM', 'SLOTS', 'RUS:seek_lag_scn;ENG:seek_lag_scn;', null, 30),
('ORA2PGSYNCX', 'SEC', 'ITEM', 'SLOTS', 'sec_after_status_changed', null, 29),
('ORA2PGSYNCX', 'IN_IDLE_COMMITS', 'ITEM', 'SLOTS', 'RUS:in_idle_commits;', 'IN', 11),
('ORA2PGSYNCX', 'IN_BYTES', 'ITEM', 'SLOTS', 'in_bytes', 'IN', 9),
('ORA2PGSYNCX', 'IN_COMMITS', 'ITEM', 'SLOTS', 'in_commits', 'IN', 10),
('ORA2PGSYNCX', 'IN_DMLS', 'ITEM', 'SLOTS', 'in_dmls', 'IN', 12),
('ORA2PGSYNCX', 'Q_IDLE_COMMITS', 'ITEM', 'SLOTS', 'RUS:q_idle_commits;', 'Q', 15),
('ORA2PGSYNCX', 'Q_COMMITS', 'ITEM', 'SLOTS', 'q_commits', 'Q', 14),
('ORA2PGSYNCX', 'Q_DMLS', 'ITEM', 'SLOTS', 'q_dmls', 'Q', 16),
('ORA2PGSYNCX', 'Q_BYTES', 'ITEM', 'SLOTS', 'q_bytes', 'Q', 13),
('ORA2PGSYNCX', 'OUT_IDLE_COMMITS', 'ITEM', 'SLOTS', 'RUS:out_idle_commits;ENG:out_idle_commits;', 'OUT', 19),
('ORA2PGSYNCX', 'OUT_COMMITS', 'ITEM', 'SLOTS', 'out_commits', 'OUT', 18),
('ORA2PGSYNCX', 'OUT_DMLS', 'ITEM', 'SLOTS', 'out_dmls', 'OUT', 20),
('ORA2PGSYNCX', 'OUT_BYTES', 'ITEM', 'SLOTS', 'out_bytes', 'OUT', 17),
('ORA2PGSYNCX', 'DISCARD_BYTES', 'ITEM', 'SLOTS', 'RUS:bytes;ENG:bytes;', 'DISCARD', 1),
('ORA2PGSYNCX', 'DISCARD_DMLS', 'ITEM', 'SLOTS', 'RUS:dmls;ENG:dmls;', 'DISCARD', 2),
('ORA2PGSYNCX', 'STATUS_ERR', 'ACTION', 'SLOTS', 'RUS:Error;ENG:Error;', 'STATUS', 1),
('ORA2PGSYNCX', 'SLOT_NAME_RESET_COUNTERS', 'ACTION', 'SLOTS', 'Reset counters', 'SLOT_NAME', 1),
('ORA2PGSYNCX', 'HISTORY', 'ITEM', 'SLOTS', 'history', 'OVF', 21),
('ORA2PGSYNCX', 'PGSESSION_STATE', 'ITEM', 'SLOTS', 'pgsession_state', 'OVF', 20),
('ORA2PGSYNCX', 'STATUS_ERR_P_XOUT', 'PARAM', 'SLOTS', 'RUS:xout;ENG:xout;', 'STATUS_ERR', 1),
('ORA2PGSYNCX', 'STATUS_ERR_P_SLOT', 'PARAM', 'SLOTS', 'RUS:Slot;ENG:Slot;', 'STATUS_ERR', 2),
('ORA2PGSYNCX', 'HISTORY_CLEAR', 'ACTION', 'SLOTS', 'Clear', 'HISTORY', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Slots', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD', 'TITLE', null, 'discard', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_BYTES', 'CAPTION', null, 'bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.discard_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_BYTES', 'HINT', null, 'discard_bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_DMLS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_DMLS', 'CAPTION', null, 'dmls', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_DMLS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_DMLS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.discard_dmls::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_DMLS', 'HINT', null, 'discard_dmls', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_DMLS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'DISCARD_DMLS', 'VISUALIZATION', null, 'BACKGROUND(rgb(240,240,240))', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'EXECUTEBATCHDURATION', 'CAPTION', 'Y', 'RUS:ExBatchDur;ENG:ExBatchDur;', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'EXECUTEBATCHDURATION', 'DATA_TYPE', null, 'INTERVAL_DS', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'EXECUTEBATCHDURATION', 'DEFINITION', null, 'ora2pg_slots.executeBatchDuration', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'EXECUTEBATCHDURATION', 'GETUP', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'EXECUTEBATCHDURATION', 'ITEM_TEMPLATE', null, 'ITEM_INTERVAL_DS', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'EXECUTEBATCHDURATION', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY', 'CAPTION', 'N', 'history', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY', 'DEFINITION', null, 'ora2pg_slots.history', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY', 'HINT', 'N', 'history', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY_CLEAR', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY_CLEAR', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY_CLEAR', 'PROC_INITIALLY', null, replace($A512330998$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_PROC} 
set command='CLEAR_HISTORY:'||{F2SQL:SLOT_NAME} where xout={F2SQL:XOUT}$A512330998$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'HISTORY_CLEAR', 'PROMPT', null, '[ico:clean]Clear', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN', 'TITLE', null, 'incoming', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_BYTES', 'CAPTION', null, 'bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.in_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_BYTES', 'HINT', 'N', 'in_bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_COMMITS', 'CAPTION', null, 'commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.in_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_COMMITS', 'HINT', 'N', 'in_commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_DMLS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_DMLS', 'CAPTION', null, 'dmls', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_DMLS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_DMLS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.in_dmls::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_DMLS', 'HINT', 'N', 'in_dmls', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_DMLS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_DMLS', 'VISUALIZATION', null, 'BACKGROUND(rgb(240,240,240))', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_IDLE_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_IDLE_COMMITS', 'CAPTION', null, replace($A888746516$idle
commits$A888746516$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_IDLE_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_IDLE_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.in_idle_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_IDLE_COMMITS', 'HINT', null, 'in_idle_commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_IDLE_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'IN_IDLE_COMMITS', 'VISIBLE', null, '{JS: if ("{ApplicationProperty:DMLSOURCE}"=="xstream")"Y";else "N";}', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LAG', 'CAPTION', 'N', 'Lag', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LAG', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LAG', 'DEFINITION', null, 'ora2pg_slots.lag', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LAG', 'GETUP', null, 'DANGER GREEN FONT_SELECTED NORMAL NORMAL GRAY', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LAG', 'ITEM_DEV_NOTES', null, replace($A469080174$(\d+) (\d+):(\d+):(\d+)\.(\d+) DANGER GREEN FONT_SELECTED NORMAL NORMAL GRAY$A469080174$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LAG', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LAG', 'MAKEUP', null, replace($A53820174$(\d+) (\d+):(\d+):(\d+)\.(\d+)$A53820174$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'CAPTION', 'N', 'lastcommitoriginaldate', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'DEFINITION', null, 'ora2pg_slots.lastcommitoriginaldate', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'FORMAT', null, 'dd.mm.yyyy hh24:mi:ss.ms', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'GETUP', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'HINT', 'N', 'lastcommitoriginaldate', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'CAPTION', null, 'commit SCN', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'DEFINITION', null, 'ora2pg_slots.lastcommitscn', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'GETUP', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'HINT', 'N', 'lastcommitscn', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'LASTCOMMITSCN', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT', 'TITLE', null, 'outgoing', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_BYTES', 'CAPTION', null, 'bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.out_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_BYTES', 'HINT', 'N', 'out_bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_COMMITS', 'CAPTION', null, 'commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.out_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_COMMITS', 'HINT', 'N', 'out_commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_DMLS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_DMLS', 'CAPTION', null, 'dmls', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_DMLS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_DMLS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.out_dmls::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_DMLS', 'HINT', 'N', 'out_dmls', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_DMLS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_DMLS', 'VISUALIZATION', null, 'BACKGROUND(rgb(240,240,240))', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_IDLE_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_IDLE_COMMITS', 'CAPTION', null, replace($A115621335$idle
commits$A115621335$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_IDLE_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_IDLE_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.out_idle_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_IDLE_COMMITS', 'HINT', null, 'out_idle_commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_IDLE_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OUT_IDLE_COMMITS', 'VISIBLE', null, '{JS: if ("{ApplicationProperty:DMLSOURCE}"=="xstream")"Y";else "N";}', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'OVF', 'GROUP_TYPE', null, 'OVERFLOW', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PGSESSION_STATE', 'CAPTION', 'N', 'pgsession_state', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PGSESSION_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PGSESSION_STATE', 'DEFINITION', null, 'ora2pg_slots.pgsession_state', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PGSESSION_STATE', 'HINT', 'N', 'pgsession_state', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PGSESSION_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PRETTY', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PRETTY', 'ICON', null, 'letter_F', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PRETTY', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PRETTY', 'PROC_FINALLY', null, replace($A269237592$JS:if ("{FormProperty:Pretty}"=="false") {
App.forms.get("{Property:FormID}").elements.get("IN_BYTES").setVal("FrtEnable","Y");
}else{
App.forms.get("{Property:FormID}").elements.get("IN_BYTES").setVal("FrtEnable","N");    
}$A269237592$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PRETTY', 'PROC_INITIALLY', null, 'FormProperty:Pretty={JS: if ("{FormProperty:Pretty}"=="true")"false";else "true";}', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'PRETTY', 'PROMPT', 'N', 'Pretty format', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q', 'TITLE', null, 'queue', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_BYTES', 'CAPTION', null, 'bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.q_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_BYTES', 'HINT', 'N', 'q_bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_COMMITS', 'CAPTION', null, 'commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.q_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_COMMITS', 'HINT', 'N', 'q_commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_DMLS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_DMLS', 'CAPTION', null, 'dmls', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_DMLS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_DMLS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.q_dmls::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_DMLS', 'HINT', 'N', 'q_dmls', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_DMLS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_DMLS', 'VISUALIZATION', null, 'BACKGROUND(rgb(240,240,240))', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_IDLE_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_IDLE_COMMITS', 'CAPTION', null, replace($A636909986$idle
commits$A636909986$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_IDLE_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_IDLE_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.q_idle_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_IDLE_COMMITS', 'HINT', null, 'q_idle_commits', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_IDLE_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'Q_IDLE_COMMITS', 'VISIBLE', null, '{JS: if ("{ApplicationProperty:DMLSOURCE}"=="xstream")"Y";else "N";}', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'RATE_OUT_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'RATE_OUT_BYTES', 'CAPTION', null, 'rate bytes', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'RATE_OUT_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'RATE_OUT_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.rate_out_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'RATE_OUT_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'RATE_OUT_BYTES', 'VISUALIZATION', null, 'BACKGROUND(rgb(240,240,240))', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REFRESH', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REFRESH', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REFRESH', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REFRESH', 'PROMPT', 'N', 'Refresh', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REFRESH', 'ROLE', null, 'TIME', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REPEAT_MODE', 'CAPTION', null, 'R', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REPEAT_MODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REPEAT_MODE', 'DEFINITION', null, replace($A162515669$case ora2pg_slots.repeat_mode when 'Y' then 'R' else null end$A162515669$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REPEAT_MODE', 'HINT', 'N', 'repeat_mode', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REPEAT_MODE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'REPEAT_MODE', 'VISUALIZATION', null, replace($A960565605$BACKGROUND(rgb({JS:if("{F:REPEAT_MODE}"=="R")"255,140,109";
else "255,255,255";}))$A960565605$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEC', 'CAPTION', null, 'Seconds after status changed', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEC', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEC', 'DEFINITION', null, 'trunc(sec)', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEC', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEC', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEEK_LAG_SCN', 'CAPTION', 'Y', 'RUS:seek_lag_scn;ENG:seek_lag_scn;', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEEK_LAG_SCN', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEEK_LAG_SCN', 'DEFINITION', null, 'seek_lag_scn', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEEK_LAG_SCN', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEEK_LAG_SCN', 'GETUP', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEEK_LAG_SCN', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SEEK_LAG_SCN', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME', 'CAPTION', 'N', 'slot_name', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME', 'DEFINITION', null, 'ora2pg_slots.slot_name', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME', 'HINT', 'N', 'slot_name', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME', 'SORT', null, '2', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME_RESET_COUNTERS', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME_RESET_COUNTERS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME_RESET_COUNTERS', 'PROC_FINALLY', null, replace($A237531578$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_PROC} 
set command='RESET_COUNTERS:'||{F2SQL:SLOT_NAME} where xout={F2SQL:XOUT}$A237531578$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'SLOT_NAME_RESET_COUNTERS', 'PROMPT', 'N', 'Reset counters', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS', 'CAPTION', 'N', 'status', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS', 'DEFINITION', null, 'ora2pg_slots.status ', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS', 'HINT', 'N', 'status', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS', 'VISUALIZATION', null, replace($A121367739$BACKGROUND(rgb({JS:if("{F:STATUS}"=="IDLE")"91,197,96";
else if ("{F:STATUS}"=="ACTIVE")"134,212,138";
else if ("{F:STATUS}"=="SEEK")"175,227,177";
else if ("{F:STATUS}"=="ERROR")"250,54,0";
else if ("{F:STATUS}"=="STOP" || "{F:STATUS}"=="STOP_POINT")"91,185,255";
else if ("{F:STATUS}"=="ABORT")"255,186,167";
else "255,255,255";}))$A121367739$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR', 'ACTIVE', null, '{JS:if ("{F:STATUS}"=="ERROR" && "{F:XOUT}") "Y";else "N";}', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR', 'COMMAND', null, 'ERROR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR', 'ICON', null, '{JS:if ("{F:STATUS}"=="ERROR" && "{F:XOUT}") "S_YELLOW_16";else "";}', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR', 'PROMPT', 'Y', 'RUS:Error;ENG:Error;', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR_P_SLOT', 'NAME', null, 'P_SLOT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR_P_SLOT', 'VALUE', null, '{F:SLOT_NAME}', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'STATUS_ERR_P_XOUT', 'VALUE', null, '{F:P_XOUT}', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'CAPTION', 'N', 'xout', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_slots.xout', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'HINT', 'N', 'xout', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'VISIBLE', null, 'Y', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', 'XOUT', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', null, 'ON_LOAD', null, 'FormProperty:Pretty=true', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', null, 'PORTION', null, '100', null),
('ORA2PGSYNCX', 'SLOTS', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A502456126$(ORA2PGSYNCX)select * from (
SELECT xout, slot_name, status,repeat_mode,pgsession_state, in_bytes, in_commits,in_idle_commits, in_dmls, q_bytes, q_commits, q_idle_commits,
q_dmls, out_bytes, out_commits, out_idle_commits, out_dmls, discard_bytes, discard_dmls,
lastcommitoriginaldate,  to_char(lag,'dd hh24:mi:ss.ms') lag,
rate_out_bytes,executeBatchDuration,
lastcommitscn, history, extract(epoch from statement_timestamp()-when_status_changed) sec,
lastcommitscn-seek_scn seek_lag_scn
FROM {ApplicationProperty:ORA2PG_SLOTS}
where xout={F2SQL:P_XOUT}
union all
select null,'Total:',max(status) filter (where status in ('ACTIVE','ERROR')),max(repeat_mode),min(pgsession_state),sum(in_bytes),sum(in_commits),sum(in_idle_commits),
sum(in_dmls),sum(q_bytes),sum(q_commits),sum(q_idle_commits),sum(q_dmls),sum(out_bytes),sum(out_commits),sum(out_idle_commits),sum(out_dmls),
sum(discard_bytes), sum(discard_dmls),
min(lastcommitoriginaldate),to_char(max(lag),'dd hh24:mi:ss.ms') lag,
sum(rate_out_bytes),max(executeBatchDuration),
min(lastcommitscn),null,min(extract(epoch from statement_timestamp()-when_status_changed)) sec,
max(lastcommitscn-seek_scn) seek_lag_scn
FROM {ApplicationProperty:ORA2PG_SLOTS}
where xout={F2SQL:P_XOUT}
)ora2pg_slots$A502456126$,chr(13),''), null);
Delete from lui_t_value where form_code='SLOTS_OLD' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='SLOTS_OLD' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='SLOTS_OLD' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='SLOTS_OLD' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'SLOTS_OLD', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'IN', 'GROUP', 'SLOTS_OLD', 'incoming', null, 8),
('ORA2PGSYNCX', 'Q', 'GROUP', 'SLOTS_OLD', 'Q', null, 12),
('ORA2PGSYNCX', 'OUT', 'GROUP', 'SLOTS_OLD', 'out', null, 16),
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'SLOTS_OLD', 'xout', null, 26),
('ORA2PGSYNCX', 'REFRESH', 'ACTION', 'SLOTS_OLD', 'Refresh', null, 2),
('ORA2PGSYNCX', 'LASTCOMMITSCN', 'ITEM', 'SLOTS_OLD', 'lastcommitscn', null, 21),
('ORA2PGSYNCX', 'LASTCOMMITORIGINALDATE', 'ITEM', 'SLOTS_OLD', 'lastcommitoriginaldate', null, 25),
('ORA2PGSYNCX', 'STATUS', 'ITEM', 'SLOTS_OLD', 'status', null, 6),
('ORA2PGSYNCX', 'SLOT_NAME', 'ITEM', 'SLOTS_OLD', 'slot_name', null, 1),
('ORA2PGSYNCX', 'P_XOUT', 'PARAM', 'SLOTS_OLD', 'xout', null, 4),
('ORA2PGSYNCX', 'OVF', 'GROUP', 'SLOTS_OLD', 'OVF', null, 24),
('ORA2PGSYNCX', 'LAG', 'ITEM', 'SLOTS_OLD', 'Lag', null, 22),
('ORA2PGSYNCX', 'PRETTY', 'ACTION', 'SLOTS_OLD', 'Pretty format', null, 3),
('ORA2PGSYNCX', 'REPEAT_MODE', 'ITEM', 'SLOTS_OLD', 'repeat_mode', null, 7),
('ORA2PGSYNCX', 'RATE_OUT_BYTES', 'ITEM', 'SLOTS_OLD', 'out_bytes_rate', null, 23),
('ORA2PGSYNCX', 'P_OTIME_MINUS_PTIME', 'PARAM', 'SLOTS_OLD', 'otime-ptime', null, 5),
('ORA2PGSYNCX', 'SEC', 'ITEM', 'SLOTS_OLD', 'sec_after_status_changed', null, 27),
('ORA2PGSYNCX', 'IN_BYTES', 'ITEM', 'SLOTS_OLD', 'in_bytes', 'IN', 9),
('ORA2PGSYNCX', 'IN_COMMITS', 'ITEM', 'SLOTS_OLD', 'in_commits', 'IN', 10),
('ORA2PGSYNCX', 'IN_DMLS', 'ITEM', 'SLOTS_OLD', 'in_dmls', 'IN', 11),
('ORA2PGSYNCX', 'Q_COMMITS', 'ITEM', 'SLOTS_OLD', 'q_commits', 'Q', 14),
('ORA2PGSYNCX', 'Q_DMLS', 'ITEM', 'SLOTS_OLD', 'q_dmls', 'Q', 15),
('ORA2PGSYNCX', 'Q_BYTES', 'ITEM', 'SLOTS_OLD', 'q_bytes', 'Q', 13),
('ORA2PGSYNCX', 'OUT_COMMITS', 'ITEM', 'SLOTS_OLD', 'out_commits', 'OUT', 18),
('ORA2PGSYNCX', 'OUT_DMLS', 'ITEM', 'SLOTS_OLD', 'out_dmls', 'OUT', 19),
('ORA2PGSYNCX', 'OUT_BYTES', 'ITEM', 'SLOTS_OLD', 'out_bytes', 'OUT', 17),
('ORA2PGSYNCX', 'STATUS_ERR', 'ACTION', 'SLOTS_OLD', 'RUS:Error;ENG:Error;', 'STATUS', 1),
('ORA2PGSYNCX', 'SLOT_NAME_RESET_COUNTERS', 'ACTION', 'SLOTS_OLD', 'Reset counters', 'SLOT_NAME', 1),
('ORA2PGSYNCX', 'HISTORY', 'ITEM', 'SLOTS_OLD', 'history', 'OVF', 21),
('ORA2PGSYNCX', 'PGSESSION_STATE', 'ITEM', 'SLOTS_OLD', 'pgsession_state', 'OVF', 20),
('ORA2PGSYNCX', 'STATUS_ERR_P_XOUT', 'PARAM', 'SLOTS_OLD', 'RUS:xout;ENG:xout;', 'STATUS_ERR', 1),
('ORA2PGSYNCX', 'STATUS_ERR_P_SLOT', 'PARAM', 'SLOTS_OLD', 'RUS:Slot;ENG:Slot;', 'STATUS_ERR', 2),
('ORA2PGSYNCX', 'HISTORY_CLEAR', 'ACTION', 'SLOTS_OLD', 'Clear', 'HISTORY', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Slots', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY', 'CAPTION', 'N', 'history', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY', 'DEFINITION', null, 'ora2pg_slots.history', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY', 'HINT', 'N', 'history', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY_CLEAR', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY_CLEAR', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY_CLEAR', 'PROC_INITIALLY', null, replace($A712173003$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_PROC} 
set command='CLEAR_HISTORY:'||{F2SQL:SLOT_NAME} where xout={F2SQL:XOUT}$A712173003$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'HISTORY_CLEAR', 'PROMPT', null, '[ico:clean]Clear', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN', 'TITLE', null, 'incoming', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_BYTES', 'CAPTION', null, 'bytes', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.in_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_BYTES', 'HINT', 'N', 'in_bytes', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_COMMITS', 'CAPTION', null, 'commits', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.in_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_COMMITS', 'HINT', 'N', 'in_commits', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_DMLS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_DMLS', 'CAPTION', null, 'dmls', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_DMLS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_DMLS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.in_dmls::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_DMLS', 'HINT', 'N', 'in_dmls', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_DMLS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'IN_DMLS', 'VISUALIZATION', null, 'BACKGROUND(rgb(240,240,240))', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LAG', 'CAPTION', 'N', 'Lag', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LAG', 'DATA_TYPE', null, 'INTERVAL_DS', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LAG', 'DEFINITION', null, 'ora2pg_slots.lag', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LAG', 'GETUP', null, replace($A920408723${JS:if ("{F:STATUS}"!="ACTIVE" && 0{F:SEC}>60)"GRAY";
else "NORMAL DANGER GREEN NORMAL DANGER FONT_SELECTED DANGER NORMAL DANGER NORMAL DANGER GRAY"}$A920408723$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LAG', 'ITEM_TEMPLATE', null, 'ITEM_INTERVAL_DS', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'CAPTION', 'N', 'lastcommitoriginaldate', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'DEFINITION', null, 'ora2pg_slots.lastcommitoriginaldate', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'FORMAT', null, 'dd.mm.yyyy hh24:mi:ss.ms', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'HINT', 'N', 'lastcommitoriginaldate', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITORIGINALDATE', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITSCN', 'CAPTION', null, 'commit SCN', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITSCN', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITSCN', 'DEFINITION', null, 'ora2pg_slots.lastcommitscn', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITSCN', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITSCN', 'HINT', 'N', 'lastcommitscn', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITSCN', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'LASTCOMMITSCN', 'WIDTH', null, '', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT', 'TITLE', null, 'outgoing', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_BYTES', 'CAPTION', null, 'bytes', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.out_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_BYTES', 'HINT', 'N', 'out_bytes', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_COMMITS', 'CAPTION', null, 'commits', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.out_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_COMMITS', 'HINT', 'N', 'out_commits', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_DMLS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_DMLS', 'CAPTION', null, 'dmls', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_DMLS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_DMLS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.out_dmls::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_DMLS', 'HINT', 'N', 'out_dmls', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_DMLS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OUT_DMLS', 'VISUALIZATION', null, 'BACKGROUND(rgb(240,240,240))', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'OVF', 'GROUP_TYPE', null, 'OVERFLOW', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PGSESSION_STATE', 'CAPTION', 'N', 'pgsession_state', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PGSESSION_STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PGSESSION_STATE', 'DEFINITION', null, 'ora2pg_slots.pgsession_state', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PGSESSION_STATE', 'HINT', 'N', 'pgsession_state', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PGSESSION_STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PRETTY', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PRETTY', 'ICON', null, 'letter_F', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PRETTY', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PRETTY', 'PROC_FINALLY', null, replace($A374956238$JS:if ("{FormProperty:Pretty}"=="false") {
App.forms.get("{Property:FormID}").elements.get("IN_BYTES").setVal("FrtEnable","Y");
}else{
App.forms.get("{Property:FormID}").elements.get("IN_BYTES").setVal("FrtEnable","N");    
}$A374956238$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PRETTY', 'PROC_INITIALLY', null, 'FormProperty:Pretty={JS: if ("{FormProperty:Pretty}"=="true")"false";else "true";}', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'PRETTY', 'PROMPT', 'N', 'Pretty format', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q', 'GROUP_TYPE', null, '', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q', 'TITLE', null, 'queue', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_BYTES', 'CAPTION', null, 'bytes', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.q_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_BYTES', 'HINT', 'N', 'q_bytes', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_COMMITS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_COMMITS', 'CAPTION', null, 'commits', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_COMMITS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_COMMITS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.q_commits::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_COMMITS', 'HINT', 'N', 'q_commits', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_COMMITS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_DMLS', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_DMLS', 'CAPTION', null, 'dmls', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_DMLS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_DMLS', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.q_dmls::bigint,false,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_DMLS', 'HINT', 'N', 'q_dmls', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_DMLS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'Q_DMLS', 'VISUALIZATION', null, 'BACKGROUND(rgb(240,240,240))', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'RATE_OUT_BYTES', 'ALIGNMENT', null, 'RIGHT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'RATE_OUT_BYTES', 'CAPTION', null, 'rate bytes', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'RATE_OUT_BYTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'RATE_OUT_BYTES', 'DEFINITION', null, '{ApplicationProperty:ORA2PG_PRETTY}(ora2pg_slots.rate_out_bytes::bigint,true,{FormProperty:Pretty})', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'RATE_OUT_BYTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REFRESH', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REFRESH', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REFRESH', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REFRESH', 'PROMPT', 'N', 'Refresh', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REFRESH', 'ROLE', null, 'TIME', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REPEAT_MODE', 'CAPTION', null, 'R', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REPEAT_MODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REPEAT_MODE', 'DEFINITION', null, replace($A757606797$case ora2pg_slots.repeat_mode when 'Y' then 'R' else null end$A757606797$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REPEAT_MODE', 'HINT', 'N', 'repeat_mode', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REPEAT_MODE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'REPEAT_MODE', 'VISUALIZATION', null, replace($A604018219$BACKGROUND(rgb({JS:if("{F:REPEAT_MODE}"=="R")"255,140,109";
else "255,255,255";}))$A604018219$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SEC', 'CAPTION', null, 'Seconds after status changed', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SEC', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SEC', 'DEFINITION', null, 'trunc(sec)', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SEC', 'HINT', 'N', 'when_status_changed', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SEC', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SEC', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME', 'CAPTION', 'N', 'slot_name', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME', 'DEFINITION', null, 'ora2pg_slots.slot_name', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME', 'HINT', 'N', 'slot_name', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME', 'SORT', null, '01', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME_RESET_COUNTERS', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME_RESET_COUNTERS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME_RESET_COUNTERS', 'PROC_FINALLY', null, replace($A813244233$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_PROC} 
set command='RESET_COUNTERS:'||{F2SQL:SLOT_NAME} where xout={F2SQL:XOUT}$A813244233$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'SLOT_NAME_RESET_COUNTERS', 'PROMPT', 'N', 'Reset counters', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS', 'CAPTION', 'N', 'status', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS', 'DEFINITION', null, 'ora2pg_slots.status', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS', 'HINT', 'N', 'status', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS', 'VISUALIZATION', null, replace($A881546324$BACKGROUND(rgb({JS:if("{F:STATUS}"=="IDLE")"91,197,96";
else if ("{F:STATUS}"=="ACTIVE")"134,212,138";
else if ("{F:STATUS}"=="SEEK")"175,227,177";
else if ("{F:STATUS}"=="ERROR")"250,54,0";
else if ("{F:STATUS}"=="STOP" || "{F:STATUS}"=="STOP_POINT")"91,185,255";
else if ("{F:STATUS}"=="ABORT")"255,186,167";
else "255,255,255";}))$A881546324$,chr(13),''), null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR', 'ACTIVE', null, '{JS:if ("{F:STATUS}"=="ERROR") "Y";else "N";}', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR', 'COMMAND', null, 'ERROR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR', 'ICON', null, '{JS:if ("{F:STATUS}"=="ERROR") "S_YELLOW_16";else "";}', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR', 'PROMPT', 'Y', 'RUS:Error;ENG:Error;', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR_P_SLOT', 'NAME', null, 'P_SLOT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR_P_SLOT', 'VALUE', null, '{F:SLOT_NAME}', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR_P_XOUT', 'NAME', null, 'P_XOUT', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'STATUS_ERR_P_XOUT', 'VALUE', null, '{F:P_XOUT}', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'XOUT', 'CAPTION', 'N', 'xout', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_slots.xout', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'XOUT', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'XOUT', 'HINT', 'N', 'xout', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', 'XOUT', 'VISIBLE', null, 'N', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', null, 'ON_LOAD', null, 'FormProperty:Pretty=true', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', null, 'PORTION', null, '100', null),
('ORA2PGSYNCX', 'SLOTS_OLD', 'DEFAULT', null, 'QUERY_TEXT', null, replace($A135046427$(ORA2PGSYNCX)select * from (
SELECT xout, slot_name, status,repeat_mode,pgsession_state, in_bytes, in_commits, in_dmls, q_bytes, q_commits, q_dmls, out_bytes, out_commits, out_dmls, 
lastcommitoriginaldate, (clock_timestamp()- lastcommitoriginaldate
+'{JS:if ("{F:P_OTIME_MINUS_PTIME}")"{F:P_OTIME_MINUS_PTIME}";else "0"} millisecond'::interval ) lag,
rate_out_bytes,
lastcommitscn, history, extract(epoch from statement_timestamp()-when_status_changed) sec
FROM {ApplicationProperty:ORA2PG_SLOTS}
where xout={F2SQL:P_XOUT}
union all
select null,'Total:',min(status) filter (where status='ACTIVE'),max(repeat_mode),min(pgsession_state),sum(in_bytes),sum(in_commits),sum(in_dmls),sum(q_bytes),sum(q_commits),sum(q_dmls),sum(out_bytes),sum(out_commits),sum(out_dmls),
min(lastcommitoriginaldate), (clock_timestamp()-min(lastcommitoriginaldate)
+'{JS:if ("{F:P_OTIME_MINUS_PTIME}")"{F:P_OTIME_MINUS_PTIME}";else "0"} millisecond'::interval) lag,
sum(rate_out_bytes),
min(lastcommitscn),null,min(extract(epoch from statement_timestamp()-when_status_changed)) sec
FROM {ApplicationProperty:ORA2PG_SLOTS}
where xout={F2SQL:P_XOUT}
)ora2pg_slots
$A135046427$,chr(13),''), null);
Delete from lui_t_value where form_code='STATS' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='STATS' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='STATS' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='STATS' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'STATS', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'XOUT', 'ITEM', 'STATS', 'xout', null, 2),
('ORA2PGSYNCX', 'METRICA', 'ITEM', 'STATS', 'metrica', null, 3),
('ORA2PGSYNCX', 'REFRESH', 'ACTION', 'STATS', 'Refresh', null, 1),
('ORA2PGSYNCX', 'VALUE_D_1K', 'ITEM', 'STATS', 'RUS:value/1K;ENG:value/1K;', null, 5),
('ORA2PGSYNCX', 'VALUE_D_1M', 'ITEM', 'STATS', 'RUS:value/1M;ENG:value/1M;', null, 6),
('ORA2PGSYNCX', 'VALUE', 'ITEM', 'STATS', 'value', null, 4);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'Replication statistics', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'METRICA', 'CAPTION', 'N', 'metrica', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'METRICA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'METRICA', 'DEFINITION', null, 'ora2pg_stats.metrica', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'METRICA', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'METRICA', 'HINT', 'N', 'metrica', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'METRICA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'REFRESH', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'REFRESH', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'REFRESH', 'PROMPT', 'N', 'Refresh', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'REFRESH', 'ROLE', null, 'TIME', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE', 'CAPTION', 'N', 'value', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE', 'DEFINITION', null, 'ora2pg_stats.value', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE', 'HINT', 'N', 'value', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1K', 'CAPTION', 'Y', 'RUS:value/1K;ENG:value/1K;', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1K', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1K', 'DEFINITION', null, replace($A347117810$ora2pg_stats.value::numeric/(case when ora2pg_stats.metrica ilike '%bytes%' then 1024 else 1000 end)$A347117810$,chr(13),''), null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1K', 'FORMAT', null, 'FM999G999G999G999G999G990.000', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1K', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1M', 'CAPTION', 'Y', 'RUS:value/1M;ENG:value/1M;', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1M', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1M', 'DEFINITION', null, replace($A451998162$ora2pg_stats.value::numeric/(case when ora2pg_stats.metrica ilike '%bytes%' then 1048576 else 1000000 end)$A451998162$,chr(13),''), null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1M', 'FORMAT', null, 'FM999G999G999G999G999G990.000', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'VALUE_D_1M', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'XOUT', 'CAPTION', 'N', 'xout', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'XOUT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'XOUT', 'DEFINITION', null, 'ora2pg_stats.xout', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'XOUT', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'XOUT', 'HINT', 'N', 'xout', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', 'XOUT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', null, 'HEADER', null, 'Replication statistics', null),
('ORA2PGSYNCX', 'STATS', 'DEFAULT', null, 'QUERY_TEXT', null, 'select * from {ApplicationProperty:ORA2PG_STATS} ora2pg_stats', null);
Delete from lui_t_value where form_code='TABLES' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='TABLES' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='TABLES' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='TABLES' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'TABLES', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'PG_NAME', 'ITEM', 'TABLES', 'RUS:pg_name;', null, 24),
('ORA2PGSYNCX', 'IGNORE_UPDCNT0', 'ITEM', 'TABLES', 'RUS:Игнорировать ошибки updcnt=0;', null, 22),
('ORA2PGSYNCX', 'COL_PROBLEMS', 'ITEM', 'TABLES', 'RUS:Columns problems;ENG:Columns problems;', null, 19),
('ORA2PGSYNCX', 'DEL', 'ACTION', 'TABLES', 'RUS:Delete table definition;ENG:Delete;', null, 5),
('ORA2PGSYNCX', 'DISCARD', 'ITEM', 'TABLES', 'RUS:Discard condition;ENG:Discard condition;', null, 27),
('ORA2PGSYNCX', 'DISCARD_ERROR', 'ITEM', 'TABLES', 'RUS:Discard condition;ENG:Discard condition;', null, 28),
('ORA2PGSYNCX', 'REFRESHED_NOTES', 'ITEM', 'TABLES', 'RUS:refreshed_notes;', null, 30),
('ORA2PGSYNCX', 'REFRESHED', 'ITEM', 'TABLES', 'RUS:Статус обновления:I-новый,U-обновлён;', null, 29),
('ORA2PGSYNCX', 'CONDITION', 'ITEM', 'TABLES', 'RUS:Replicaton condition;', null, 25),
('ORA2PGSYNCX', 'CONDITION_ERROR', 'ITEM', 'TABLES', 'RUS:condition_error;', null, 26),
('ORA2PGSYNCX', 'COLUMNS', 'ACTION', 'TABLES', 'Columns', null, 2),
('ORA2PGSYNCX', 'SHOW_COLUMNS', 'ACTION', 'TABLES', 'Show Columns', null, 3),
('ORA2PGSYNCX', 'EXCLUDE', 'ITEM', 'TABLES', 'exclude', null, 21),
('ORA2PGSYNCX', 'RATIO', 'ITEM', 'TABLES', 'ratio', null, 20),
('ORA2PGSYNCX', 'WARNING', 'ITEM', 'TABLES', 'warning', null, 18),
('ORA2PGSYNCX', 'PROBLEM', 'ITEM', 'TABLES', 'problem', null, 17),
('ORA2PGSYNCX', 'SLOT_U', 'ITEM', 'TABLES', 'slot_u', null, 16),
('ORA2PGSYNCX', 'SLOT', 'ITEM', 'TABLES', 'slot', null, 15),
('ORA2PGSYNCX', 'SPLIT_U', 'ITEM', 'TABLES', 'split_u', null, 14),
('ORA2PGSYNCX', 'SPLIT', 'ITEM', 'TABLES', 'split', null, 13),
('ORA2PGSYNCX', 'ORA_PART_ROW_MOV', 'ITEM', 'TABLES', 'ora_part_row_mov', null, 12),
('ORA2PGSYNCX', 'ORA_PART', 'ITEM', 'TABLES', 'ora_part', null, 11),
('ORA2PGSYNCX', 'ORA_IOT_TYPE', 'ITEM', 'TABLES', 'ora_iot_type', null, 10),
('ORA2PGSYNCX', 'ORA_XSUP', 'ITEM', 'TABLES', 'ora_xsup', null, 9),
('ORA2PGSYNCX', 'REQUERY_ROW', 'ACTION', 'TABLES', 'Requery row', null, 4),
('ORA2PGSYNCX', 'FIX', 'GROUP', 'TABLES', 'Fix', null, 1),
('ORA2PGSYNCX', 'NOTES', 'ITEM', 'TABLES', 'Notes', null, 23),
('ORA2PGSYNCX', 'IGNORE_UPDCNT0_NULL', 'ACTION', 'TABLES', 'RUS:Set Null;ENG:Set null;', 'IGNORE_UPDCNT0', 1),
('ORA2PGSYNCX', 'IGNORE_UPDCNT0_Y', 'ACTION', 'TABLES', 'RUS:Set Y;ENG:Set Y;', 'IGNORE_UPDCNT0', 3),
('ORA2PGSYNCX', 'IGNORE_UPDCNT0_C', 'ACTION', 'TABLES', 'RUS:Set C;ENG:Set C;', 'IGNORE_UPDCNT0', 5),
('ORA2PGSYNCX', 'DISCARD_EDIT', 'ACTION', 'TABLES', 'RUS:Define discard query;ENG:Define discard query;', 'DISCARD', 1),
('ORA2PGSYNCX', 'CONDITION_EDIT', 'ACTION', 'TABLES', 'RUS:Define condition;ENG:Define condtion;', 'CONDITION', 1),
('ORA2PGSYNCX', 'COLUMNS_P_ORA_SCHEMA', 'PARAM', 'TABLES', 'ora_schema', 'COLUMNS', 1),
('ORA2PGSYNCX', 'COLUMNS_P_ORA_TABLE', 'PARAM', 'TABLES', 'ora_table', 'COLUMNS', 2),
('ORA2PGSYNCX', 'COLUMNS_CONFIG', 'PARAM', 'TABLES', 'CONFIG', 'COLUMNS', 3),
('ORA2PGSYNCX', 'EXCLUDE_EDIT', 'ACTION', 'TABLES', 'Изменить', 'EXCLUDE', 3),
('ORA2PGSYNCX', 'EXC', 'ACTION', 'TABLES', 'exclude', 'EXCLUDE', 1),
('ORA2PGSYNCX', 'INC', 'ACTION', 'TABLES', 'include', 'EXCLUDE', 2),
('ORA2PGSYNCX', 'WARNING_EDIT', 'ACTION', 'TABLES', 'Change', 'WARNING', 1),
('ORA2PGSYNCX', 'PROBLEM_PROBLEM_CLEAR', 'ACTION', 'TABLES', 'RUS:Clear;ENG:Clear;', 'PROBLEM', 2),
('ORA2PGSYNCX', 'PROBLEM_EDIT', 'ACTION', 'TABLES', 'Изменить', 'PROBLEM', 1),
('ORA2PGSYNCX', 'SLOT_CHANGE', 'ACTION', 'TABLES', 'Change', 'SLOT_U', 1),
('ORA2PGSYNCX', 'SPLIT_U_BY_ROWID', 'ACTION', 'TABLES', 'Split by ROWID', 'SPLIT_U', 1),
('ORA2PGSYNCX', 'SPLIT_U_CLEAR', 'ACTION', 'TABLES', 'Clear', 'SPLIT_U', 2),
('ORA2PGSYNCX', 'ORA_SCHEMA', 'ITEM', 'TABLES', 'ora_schema', 'FIX', 5),
('ORA2PGSYNCX', 'ORA_TABLE', 'ITEM', 'TABLES', 'ora_table', 'FIX', 6),
('ORA2PGSYNCX', 'PG_SCHEMA', 'ITEM', 'TABLES', 'pg_schema', 'FIX', 7),
('ORA2PGSYNCX', 'PG_TABLE', 'ITEM', 'TABLES', 'pg_table', 'FIX', 8),
('ORA2PGSYNCX', 'NOTES_CHANGE', 'ACTION', 'TABLES', 'Change', 'NOTES', 1),
('ORA2PGSYNCX', 'NOTES_SETSAME', 'ACTION', 'TABLES', 'Set for all selected', 'NOTES', 2),
('ORA2PGSYNCX', 'DISCARD_EDIT_P_ORA_SCHEMA', 'PARAM', 'TABLES', 'RUS:ora_schema;ENG:ora_schema;', 'DISCARD_EDIT', 1),
('ORA2PGSYNCX', 'DISCARD_EDIT_P_ORA_TABLE', 'PARAM', 'TABLES', 'RUS:ora_table;ENG:ora_table;', 'DISCARD_EDIT', 2),
('ORA2PGSYNCX', 'CONDITION_EDIT_P_ORA_SCHEMA', 'PARAM', 'TABLES', 'RUS:ora_schema;ENG:ora_schema;', 'CONDITION_EDIT', 1),
('ORA2PGSYNCX', 'CONDITION_EDIT_P_ORA_TABLE', 'PARAM', 'TABLES', 'RUS:ora_table;ENG:ora_table;', 'CONDITION_EDIT', 2),
('ORA2PGSYNCX', 'PG_SCHEMA_EDIT', 'ACTION', 'TABLES', 'Изменить', 'PG_SCHEMA', 1),
('ORA2PGSYNCX', 'PG_TABLE_EDIT', 'ACTION', 'TABLES', 'Изменить', 'PG_TABLE', 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'Tables', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'CAPTION', 'Y', 'RUS:Columns problems;ENG:Columns problems;', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'CAPTION_VISUAL', null, replace($A11774887${SQL:(ORA2PGSYNCX)select 'TEXTCOLOR(red)' from {ApplicationProperty:ORA2PG_COL} where problem is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A11774887$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'DEFINITION', null, replace($A312133383$(select 'Y' from {ApplicationProperty:ORA2PG_COL} c where c.problem is not null and c.ora_schema = ora2pg_tab.ora_schema and c.ora_table=ora2pg_tab.ora_table limit 1)$A312133383$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'GETUP', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'ITEM_TEMPLATE', null, 'ID', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'MAKEUP', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COL_PROBLEMS', 'VISUALIZATION', null, 'TEXTCOLOR(red)', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS', 'ACTIVE', null, '{FormProperty:ShowColumns}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS', 'COMMAND', null, 'COLUMNS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS', 'COMMAND_TYPE', null, 'LIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS', 'ROLE', null, 'AUTO', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS_CONFIG', 'NAME', null, 'CONFIG', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS_CONFIG', 'VALUE', null, 'DETAIL', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS_P_ORA_SCHEMA', 'NAME', null, 'P_ORA_SCHEMA', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS_P_ORA_SCHEMA', 'VALUE', null, '{F:ORA_SCHEMA}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS_P_ORA_TABLE', 'NAME', null, 'P_ORA_TABLE', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'COLUMNS_P_ORA_TABLE', 'VALUE', null, '{F:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION', 'CAPTION', null, 'Replcation condtion', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION', 'CAPTION_VISUAL', null, replace($A75177520${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_TAB} where condition is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A75177520$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION', 'DEFINITION', null, 'ora2pg_tab.condition', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION', 'HINT', null, 'Replicaton condtion', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT', 'APPLY_TO', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT', 'COMMAND', null, 'REPLCATION_CONDITION', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT', 'PROMPT', null, '[ico:edit]Define condition', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT_P_ORA_SCHEMA', 'NAME', null, 'P_ORA_SCHEMA', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT_P_ORA_SCHEMA', 'VALUE', null, '{F:ORA_SCHEMA}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT_P_ORA_TABLE', 'NAME', null, 'P_ORA_TABLE', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_EDIT_P_ORA_TABLE', 'VALUE', null, '{F:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_ERROR', 'CAPTION', null, 'condition_error', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_ERROR', 'CAPTION_VISUAL', null, replace($A762296152${SQL:(ORA2PGSYNCX)select 'TEXTCOLOR(red)' from {ApplicationProperty:ORA2PG_TAB} where condition_error is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A762296152$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_ERROR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_ERROR', 'DEFINITION', null, 'ora2pg_tab.condition_error', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_ERROR', 'HINT', null, 'condition_error', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'CONDITION_ERROR', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'ICON', null, 'delrow', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'PROC_INITIALLY', null, replace($A421597224$SQL:(ORA2PGSYNCX)delete from {ApplicationProperty:ORA2PG_COL} where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE};
delete from {ApplicationProperty:ORA2PG_TAB} where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE};$A421597224$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'PROMPT', 'Y', 'RUS:Delete table definition;ENG:Delete;', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'QUESTION', null, replace($A705114274${JS:if ("{FormProperty:SelectionMode}" == "Single") "Definition for table {F:ORA_SCHEMA}.{F:ORA_TABLE} will be deleted."
else "Definitions for {FormProperty:CountSelected} tables will be deleted."}$A705114274$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DEL', 'ROLE', null, 'DELETE', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD', 'CAPTION', 'Y', 'ENG:Discarding query;RUS:Discarding query;', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD', 'CAPTION_VISUAL', null, replace($A418463803${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_TAB} where discard is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A418463803$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD', 'DEFINITION', null, 'ora2pg_tab.discard', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD', 'HINT', null, 'Discard condition SQL query', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT', 'APPLY_TO', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT', 'COMMAND', null, 'DISCARD_QUERY', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT', 'COMMAND_TYPE', null, 'BLANK', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT', 'PROMPT', null, '[ico:edit]Define query', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT_P_ORA_SCHEMA', 'NAME', null, 'P_ORA_SCHEMA', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT_P_ORA_SCHEMA', 'VALUE', null, '{F:ORA_SCHEMA}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT_P_ORA_TABLE', 'NAME', null, 'P_ORA_TABLE', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_EDIT_P_ORA_TABLE', 'VALUE', null, '{F:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_ERROR', 'CAPTION', null, 'discard_error', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_ERROR', 'CAPTION_VISUAL', null, replace($A352454939${SQL:(ORA2PGSYNCX)select 'TEXTCOLOR(red)' from {ApplicationProperty:ORA2PG_TAB} where discard_error is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A352454939$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_ERROR', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_ERROR', 'DEFINITION', null, 'ora2pg_tab.discard_error', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_ERROR', 'HINT', null, 'condition_error', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'DISCARD_ERROR', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXC', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXC', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXC', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXC', 'ICON', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXC', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXC', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXC', 'PROC_INITIALLY', null, replace($A955984194$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set exclude='Y' where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}$A955984194$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXC', 'PROMPT', null, '[ico:cancel]Exclude', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE', 'CAPTION', 'N', 'exclude', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE', 'CAPTION_VISUAL', null, replace($A522700535${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_TAB} where exclude is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A522700535$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE', 'DEFINITION', null, 'ora2pg_tab.exclude', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE', 'HINT', 'N', 'exclude', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE', 'VISUALIZATION', null, '{JS:"{Property:Value}"?"BACKGROUND(yellow)":""}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE_EDIT', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE_EDIT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set exclude={F2SQL:EXCLUDE} where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'EXCLUDE_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'FIX', 'GROUP_TYPE', null, 'FIXED', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0', 'CAPTION', null, 'Ignore updcnt=0', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0', 'CAPTION_VISUAL', null, replace($A908760454${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_TAB} where ignore_updcnt0 is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A908760454$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0', 'DEFINITION', null, 'ora2pg_tab.ignore_updcnt0', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0', 'HINT', null, 'Игнорировать ошибки updcnt=0', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0', 'VISUALIZATION', null, '{JS:"{Property:Value}"?"BACKGROUND(yellow)":""}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_C', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_C', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_C', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_C', 'ICON', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_C', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_C', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_C', 'PROC_INITIALLY', null, replace($A233377120$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set ignore_updcnt0='C' where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}$A233377120$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_C', 'PROMPT', null, '[ico:Ya2]Set Ignore with check ORA2PG.DISCARD setting', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_NULL', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_NULL', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_NULL', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_NULL', 'ICON', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_NULL', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_NULL', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_NULL', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set ignore_updcnt0=null where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_NULL', 'PROMPT', null, '[ico:delrow]set Not Ignore', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_Y', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_Y', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_Y', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_Y', 'ICON', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_Y', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_Y', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_Y', 'PROC_INITIALLY', null, replace($A47835456$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set ignore_updcnt0='Y' where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}$A47835456$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'IGNORE_UPDCNT0_Y', 'PROMPT', null, '[ico:Ya]set Ignore', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'INC', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'INC', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'INC', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'INC', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'INC', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'INC', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set exclude=null where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'INC', 'PROMPT', null, '[ico:addrow]Include', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES', 'CAPTION', null, 'Notes', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES', 'CAPTION_VISUAL', null, replace($A707301900${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_TAB} where notes is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A707301900$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES', 'DEFINITION', null, 'ora2pg_tab.notes', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES', 'ITEM_TEMPLATE', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_CHANGE', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_CHANGE', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_CHANGE', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_CHANGE', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_CHANGE', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_CHANGE', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set notes={F2SQL:NOTES} where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_CHANGE', 'PROMPT', 'N', 'Change', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_CHANGE', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_SETSAME', 'ACTIVE', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"N";else "EXIST";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_SETSAME', 'AFTER', null, 'ALL', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_SETSAME', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_SETSAME', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_SETSAME', 'PROC_FINALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set notes={FormProperty:Notes4All} where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_SETSAME', 'PROC_INITIALLY', null, replace($A425338007$FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}
$A425338007$||$A425338007$
FormProperty:Notes4All={F2SQL:NOTES}$A425338007$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'NOTES_SETSAME', 'PROMPT', null, 'Set same for all selected', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_IOT_TYPE', 'CAPTION', 'N', 'ora_iot_type', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_IOT_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_IOT_TYPE', 'DEFINITION', null, 'ora2pg_tab.ora_iot_type', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_IOT_TYPE', 'HINT', 'N', 'ora_iot_type', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_IOT_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART', 'CAPTION', 'N', 'ora_part', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART', 'DEFINITION', null, 'ora2pg_tab.ora_part', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART', 'HINT', 'N', 'ora_part', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART_ROW_MOV', 'ALIGNMENT', null, 'CENTER', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART_ROW_MOV', 'CAPTION', 'N', 'ora_part_row_mov', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART_ROW_MOV', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART_ROW_MOV', 'DEFINITION', null, 'ora2pg_tab.ora_part_row_mov', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART_ROW_MOV', 'HINT', 'N', 'ora_part_row_mov', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_PART_ROW_MOV', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_SCHEMA', 'CAPTION', 'N', 'ora_schema', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_SCHEMA', 'DEFINITION', null, 'ora2pg_tab.ora_schema', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_SCHEMA', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_SCHEMA', 'HINT', 'N', 'ora_schema', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_SCHEMA', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_TABLE', 'CAPTION', 'N', 'ora_table', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_TABLE', 'DEFINITION', null, 'ora2pg_tab.ora_table', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_TABLE', 'FOR_UNIQUE_KEY', null, 'Y', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_TABLE', 'HINT', 'N', 'ora_table', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_TABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_TABLE', 'SORT', null, '2', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_TABLE', 'TOTAL', null, 'count(*)', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_XSUP', 'CAPTION', 'N', 'ora_xsup', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_XSUP', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_XSUP', 'DEFINITION', null, 'ora2pg_tab.ora_xsup', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_XSUP', 'HINT', 'N', 'ora_xsup', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'ORA_XSUP', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_NAME', 'CAPTION', null, 'pg_name', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_NAME', 'DEFINITION', null, 'ora2pg_tab.pg_name', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_NAME', 'HINT', null, 'pg_name', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_NAME', 'WIDTH', null, '0', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA', 'CAPTION', 'N', 'pg_schema', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA', 'DEFINITION', null, 'ora2pg_tab.pg_schema', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA', 'HINT', 'N', 'pg_schema', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'PROC_INITIALLY', null, replace($A270005946$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set pg_schema={F2SQL:PG_SCHEMA},
 pg_name=format('%I',{F2SQL:PG_SCHEMA})||'.'||format('%I',{F2SQL:PG_TABLE}) 
where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}$A270005946$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_SCHEMA_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE', 'CAPTION', 'N', 'pg_table', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE', 'DEFINITION', null, 'ora2pg_tab.pg_table', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE', 'HINT', 'N', 'pg_table', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE_EDIT', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE_EDIT', 'PROC_INITIALLY', null, replace($A622297566$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set pg_table={F2SQL:PG_TABLE},
 pg_name=format('%I',{F2SQL:PG_SCHEMA})||'.'||format('%I',{F2SQL:PG_TABLE}) 
 where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}$A622297566$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PG_TABLE_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM', 'CAPTION', 'N', 'problem', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM', 'CAPTION_VISUAL', null, replace($A850531556${SQL:(ORA2PGSYNCX)select 'TEXTCOLOR(red)' from {ApplicationProperty:ORA2PG_TAB} where problem is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A850531556$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM', 'DEFINITION', null, 'ora2pg_tab.problem', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM', 'HINT', 'N', 'problem', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM', 'TOTAL', null, 'count("PROBLEM")', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM', 'VISUALIZATION', null, 'TEXTCOLOR(red)', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_EDIT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set problem={F2SQL:PROBLEM} where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_PROBLEM_CLEAR', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_PROBLEM_CLEAR', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_PROBLEM_CLEAR', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_PROBLEM_CLEAR', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_PROBLEM_CLEAR', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_PROBLEM_CLEAR', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set problem=null where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'PROBLEM_PROBLEM_CLEAR', 'PROMPT', null, '[ico:clean]Clear', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'RATIO', 'CAPTION', 'N', 'ratio', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'RATIO', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'RATIO', 'DEFINITION', null, 'ora2pg_tab.ratio', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'RATIO', 'FORMAT', null, 'FM999G999G999G999G999G990', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'RATIO', 'HINT', 'N', 'ratio', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'RATIO', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED', 'CAPTION', null, 'refreshed', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED', 'DEFINITION', null, 'ora2pg_tab.refreshed', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED_NOTES', 'CAPTION', null, 'refreshed_notes', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED_NOTES', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED_NOTES', 'DEFINITION', null, 'ora2pg_tab.refreshed_notes', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED_NOTES', 'HINT', null, 'refreshed_notes', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REFRESHED_NOTES', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REQUERY_ROW', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REQUERY_ROW', 'AFTER', null, 'CURRENT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REQUERY_ROW', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REQUERY_ROW', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'REQUERY_ROW', 'PROMPT', 'N', 'Requery row', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SHOW_COLUMNS', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SHOW_COLUMNS', 'DISPLAY', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SHOW_COLUMNS', 'EXPLANATION', null, 'Show columns', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SHOW_COLUMNS', 'ICON', null, 'vlist', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SHOW_COLUMNS', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SHOW_COLUMNS', 'PROC_INITIALLY', null, 'FormProperty:ShowColumns={JS:if ("{FormProperty:ShowColumns}"=="EXIST")"N";else "EXIST";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SHOW_COLUMNS', 'PROMPT', null, 'Show columns', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT', 'CAPTION', 'N', 'slot', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT', 'DEFINITION', null, 'ora2pg_tab.slot', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT', 'HINT', 'N', 'slot', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_CHANGE', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_CHANGE', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_CHANGE', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_CHANGE', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_CHANGE', 'PROC_FINALLY', null, replace($A94645194$SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB} 
set slot_u={FormProperty:SLOT_U}
where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}$A94645194$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_CHANGE', 'PROC_INITIALLY', null, replace($A99991639$FormProperty:SLOT_U={QuoteNull:{LOVQ:(ORA2PGSYNCX) select 
coalesce(slot,slot_u) "slot", count(*) "tables" from {ApplicationProperty:ORA2PG_TAB} where
coalesce(slot,slot_u) is not null
group by coalesce(slot,slot_u)
union
select 'N'||to_char(max(substr(coalesce(slot,slot_u),2)::int)+1,'FM0009'), 0 from {ApplicationProperty:ORA2PG_TAB} 
union
select null,null
order by 1}}
$A99991639$||$A99991639$
FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}$A99991639$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_CHANGE', 'PROMPT', null, '[ico:edit]Change', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_U', 'CAPTION', 'N', 'slot_u', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_U', 'CAPTION_VISUAL', null, replace($A535663645${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_TAB} where slot_u is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A535663645$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_U', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_U', 'DEFINITION', null, 'ora2pg_tab.slot_u', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_U', 'HINT', 'N', 'slot_u', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_U', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SLOT_U', 'VISUALIZATION', null, '{JS:"{Property:Value}"?"BACKGROUND(yellow)":""}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT', 'CAPTION', 'N', 'split', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT', 'DEFINITION', null, 'ora2pg_tab.split', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT', 'HINT', 'N', 'split', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U', 'CAPTION', 'N', 'split_u', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U', 'CAPTION_VISUAL', null, replace($A858996520${SQL:(ORA2PGSYNCX)select 'BACKGROUND(yellow)' from {ApplicationProperty:ORA2PG_TAB} where split_u is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A858996520$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U', 'DEFINITION', null, 'ora2pg_tab.split_u', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U', 'HINT', 'N', 'split_u', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U', 'VISUALIZATION', null, '{JS:"{Property:Value}"?"BACKGROUND(yellow)":""}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_BY_ROWID', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_BY_ROWID', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_BY_ROWID', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_BY_ROWID', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_BY_ROWID', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_BY_ROWID', 'PROC_INITIALLY', null, replace($A168029981$SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_TAB} set split_u='ROW_ID' where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}$A168029981$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_BY_ROWID', 'PROMPT', null, '[ico:co_grate]Split by ROW_ID', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_CLEAR', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_CLEAR', 'AFTER', null, '{JS:if ("{FormProperty:SelectionMode}"=="Single")"CURRENT";else "ALL";}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_CLEAR', 'APPLY_TO', null, 'PROGRESS', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_CLEAR', 'EXPLANATION', null, 'Clear', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_CLEAR', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_CLEAR', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_CLEAR', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update {ApplicationProperty:ORA2PG_TAB} set split_u=null where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'SPLIT_U_CLEAR', 'PROMPT', null, '[ico:clean]Clear', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING', 'CAPTION', 'N', 'warning', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING', 'CAPTION_VISUAL', null, replace($A734638664${SQL:(ORA2PGSYNCX)select 'TEXTCOLOR(brown)' from {ApplicationProperty:ORA2PG_TAB} where warning is not null limit 1 /*{FormProperty:SPLIT_U_N}*/}$A734638664$,chr(13),''), null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING', 'DEFINITION', null, 'ora2pg_tab.warning', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING', 'HINT', 'N', 'warning', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING', 'TOTAL', null, 'count("WARNING")', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING', 'VISUALIZATION', null, 'TEXTCOLOR(brown)', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING_EDIT', 'ACTIVE', null, 'EXIST', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING_EDIT', 'LOCK', null, 'N', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING_EDIT', 'PROC_FINALLY', null, 'FormProperty:SPLIT_U_N={JS:0{FormProperty:SPLIT_U_N}+1}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING_EDIT', 'PROC_INITIALLY', null, 'SQL:(ORA2PGSYNCX)update  {ApplicationProperty:ORA2PG_TAB}  set warning={F2SQL:WARNING} where ora_schema={F2SQL:ORA_SCHEMA} and ora_table={F2SQL:ORA_TABLE}', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING_EDIT', 'PROMPT', null, '', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', 'WARNING_EDIT', 'ROLE', null, 'POSTEDIT', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', null, 'HEADER', null, 'Tables', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', null, 'LINE_FEED', null, 'PRELINE', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', null, 'QUERY_TEXT', null, '(ORA2PGSYNCX)select * from {ApplicationProperty:ORA2PG_TAB} ora2pg_tab', null),
('ORA2PGSYNCX', 'TABLES', 'DEFAULT', null, 'START_MODE', null, 'SINGLE_ROW', null);
Delete from lui_t_value where form_code='V_X_ALERT_HIST' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='V_X_ALERT_HIST' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='V_X_ALERT_HIST' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='V_X_ALERT_HIST' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'OBJECT_NAME', 'ITEM', 'V_X_ALERT_HIST', 'RUS:OBJECT_NAME;', null, 2),
('ORA2PGSYNCX', 'OBJECT_TYPE', 'ITEM', 'V_X_ALERT_HIST', 'RUS:OBJECT_TYPE;', null, 3),
('ORA2PGSYNCX', 'REASON', 'ITEM', 'V_X_ALERT_HIST', 'RUS:REASON;', null, 4),
('ORA2PGSYNCX', 'CREATION_TIME', 'ITEM', 'V_X_ALERT_HIST', 'RUS:CREATION_TIME;', null, 1),
('ORA2PGSYNCX', 'MESSAGE_GROUP', 'ITEM', 'V_X_ALERT_HIST', 'RUS:MESSAGE_GROUP;', null, 5),
('ORA2PGSYNCX', 'MESSAGE_TYPE', 'ITEM', 'V_X_ALERT_HIST', 'RUS:MESSAGE_TYPE;', null, 6),
('ORA2PGSYNCX', 'SUGGESTED_ACTION', 'ITEM', 'V_X_ALERT_HIST', 'RUS:SUGGESTED_ACTION;', null, 7);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'RUS:Alert history;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'CREATION_TIME', 'CAPTION', null, 'CREATION_TIME', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'CREATION_TIME', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'CREATION_TIME', 'DEFINITION', null, 'ah.CREATION_TIME', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'CREATION_TIME', 'HINT', null, 'CREATION_TIME', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'CREATION_TIME', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'CREATION_TIME', 'SORT', null, '-1', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_GROUP', 'CAPTION', null, 'MESSAGE_GROUP', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_GROUP', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_GROUP', 'DEFINITION', null, 'ah.MESSAGE_GROUP', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_GROUP', 'HINT', null, 'MESSAGE_GROUP', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_GROUP', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_TYPE', 'CAPTION', null, 'MESSAGE_TYPE', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_TYPE', 'DEFINITION', null, 'ah.MESSAGE_TYPE', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_TYPE', 'HINT', null, 'MESSAGE_TYPE', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'MESSAGE_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_NAME', 'CAPTION', null, 'OBJECT_NAME', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_NAME', 'DEFINITION', null, 'ah.OBJECT_NAME', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_NAME', 'HINT', null, 'OBJECT_NAME', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_TYPE', 'CAPTION', null, 'OBJECT_TYPE', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_TYPE', 'DEFINITION', null, 'ah.OBJECT_TYPE', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_TYPE', 'HINT', null, 'OBJECT_TYPE', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'OBJECT_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'REASON', 'CAPTION', null, 'REASON', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'REASON', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'REASON', 'DEFINITION', null, 'ah.REASON', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'REASON', 'HINT', null, 'REASON', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'REASON', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'SUGGESTED_ACTION', 'CAPTION', null, 'SUGGESTED_ACTION', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'SUGGESTED_ACTION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'SUGGESTED_ACTION', 'DEFINITION', null, 'ah.SUGGESTED_ACTION', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'SUGGESTED_ACTION', 'HINT', null, 'SUGGESTED_ACTION', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', 'SUGGESTED_ACTION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', null, 'HEADER', null, 'Alert history', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', null, 'LINE_FEED', null, 'WRAP', null),
('ORA2PGSYNCX', 'V_X_ALERT_HIST', 'DEFAULT', null, 'QUERY_TEXT', null, '(XSTREAM)select * from DBA_ALERT_HISTORY_DETAIL ah', null);
Delete from lui_t_value where form_code='V_X_CAPTURE' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='V_X_CAPTURE' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='V_X_CAPTURE' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='V_X_CAPTURE' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'V_X_CAPTURE', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'SID', 'ITEM', 'V_X_CAPTURE', 'RUS:SID;', null, 1),
('ORA2PGSYNCX', 'SERIAL#', 'ITEM', 'V_X_CAPTURE', 'RUS:SERIAL#;', null, 2),
('ORA2PGSYNCX', 'CAPTURE_NAME', 'ITEM', 'V_X_CAPTURE', 'RUS:CAPTURE_NAME;', null, 3),
('ORA2PGSYNCX', 'SGA_ALLOCATED', 'ITEM', 'V_X_CAPTURE', 'RUS:SGA_ALLOCATED;', null, 7),
('ORA2PGSYNCX', 'STARTUP_TIME', 'ITEM', 'V_X_CAPTURE', 'RUS:STARTUP_TIME;', null, 5),
('ORA2PGSYNCX', 'STATE', 'ITEM', 'V_X_CAPTURE', 'RUS:STATE;', null, 4),
('ORA2PGSYNCX', 'LOGMINER_ID', 'ITEM', 'V_X_CAPTURE', 'RUS:LOGMINER_ID;', null, 6),
('ORA2PGSYNCX', 'TOTAL_PREFILTER_KEPT', 'ITEM', 'V_X_CAPTURE', 'RUS:TOTAL_PREFILTER_KEPT;', null, 13),
('ORA2PGSYNCX', 'SGA_USED', 'ITEM', 'V_X_CAPTURE', 'RUS:SGA_USED;', null, 8),
('ORA2PGSYNCX', 'TOTAL_PREFILTER_EVALUATIONS', 'ITEM', 'V_X_CAPTURE', 'RUS:TOTAL_PREFILTER_EVALUATIONS;', null, 12),
('ORA2PGSYNCX', 'TOTAL_PREFILTER_DISCARDED', 'ITEM', 'V_X_CAPTURE', 'RUS:TOTAL_PREFILTER_DISCARDED;', null, 11),
('ORA2PGSYNCX', 'LOG_SCAN_LATENCY', 'ITEM', 'V_X_CAPTURE', 'RUS:LOG_SCAN_LATENCY;ENG:LOG_SCAN_LATENCY;', null, 9),
('ORA2PGSYNCX', 'CAPTURE_MESSAGE_NUMBER', 'ITEM', 'V_X_CAPTURE', 'RUS:CAPTURE_MESSAGE_NUMBER;', null, 16),
('ORA2PGSYNCX', 'CAPTURE_MESSAGE_CREATE_TIME', 'ITEM', 'V_X_CAPTURE', 'RUS:CAPTURE_MESSAGE_CREATE_TIME;', null, 15),
('ORA2PGSYNCX', 'CAPTURE_TIME', 'ITEM', 'V_X_CAPTURE', 'RUS:CAPTURE_TIME;', null, 14),
('ORA2PGSYNCX', 'ENQUEUE_LATENCY', 'ITEM', 'V_X_CAPTURE', 'RUS:ENQUEUE_LATENCY;ENG:ENQUEUE_LATENCY;', null, 10);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'RUS:v$xstream_capture;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_CREATE_TIME', 'CAPTION', null, 'CAPTURE_MESSAGE_CREATE_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_CREATE_TIME', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_CREATE_TIME', 'DEFINITION', null, 'vc.CAPTURE_MESSAGE_CREATE_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_CREATE_TIME', 'HINT', null, 'CAPTURE_MESSAGE_CREATE_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_CREATE_TIME', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_NUMBER', 'CAPTION', null, 'CAPTURE_MESSAGE_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_NUMBER', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_NUMBER', 'DEFINITION', null, 'vc.CAPTURE_MESSAGE_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_NUMBER', 'HINT', null, 'CAPTURE_MESSAGE_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_MESSAGE_NUMBER', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_NAME', 'CAPTION', null, 'CAPTURE_NAME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_NAME', 'DEFINITION', null, 'vc.CAPTURE_NAME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_NAME', 'HINT', null, 'CAPTURE_NAME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_TIME', 'CAPTION', null, 'CAPTURE_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_TIME', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_TIME', 'DEFINITION', null, 'vc.CAPTURE_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_TIME', 'HINT', null, 'CAPTURE_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'CAPTURE_TIME', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'ENQUEUE_LATENCY', 'CAPTION', 'Y', 'RUS:ENQUEUE_LATENCY;ENG:ENQUEUE_LATENCY;', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'ENQUEUE_LATENCY', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'ENQUEUE_LATENCY', 'DEFINITION', null, '(vc.ENQUEUE_TIME-vc.ENQUEUE_MESSAGE_CREATE_TIME)*86400', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'ENQUEUE_LATENCY', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOGMINER_ID', 'CAPTION', null, 'LOGMINER_ID', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOGMINER_ID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOGMINER_ID', 'DEFINITION', null, 'vc.LOGMINER_ID', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOGMINER_ID', 'HINT', null, 'LOGMINER_ID', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOGMINER_ID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOG_SCAN_LATENCY', 'CAPTION', 'Y', 'RUS:LOG_SCAN_LATENCY;ENG:LOG_SCAN_LATENCY;', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOG_SCAN_LATENCY', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOG_SCAN_LATENCY', 'DEFINITION', null, '((SYSDATE - vc.CAPTURE_MESSAGE_CREATE_TIME)*86400) ', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'LOG_SCAN_LATENCY', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SERIAL#', 'CAPTION', null, 'SERIAL#', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SERIAL#', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SERIAL#', 'DEFINITION', null, 'vc.SERIAL#', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SERIAL#', 'HINT', null, 'SERIAL#', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SERIAL#', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_ALLOCATED', 'CAPTION', null, 'SGA_ALLOCATED (Mb)', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_ALLOCATED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_ALLOCATED', 'DEFINITION', null, 'vc.SGA_ALLOCATED/1024/1024', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_ALLOCATED', 'FORMAT', null, 'FM999999990.0', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_ALLOCATED', 'HINT', null, 'SGA_ALLOCATED', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_ALLOCATED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_USED', 'CAPTION', null, 'SGA_USED (Mb)', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_USED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_USED', 'DEFINITION', null, 'vc.SGA_USED/1024/1024', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_USED', 'FORMAT', null, 'FM999999990.0', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_USED', 'HINT', null, 'SGA_USED', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SGA_USED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SID', 'CAPTION', null, 'SID', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SID', 'DEFINITION', null, 'vc.SID', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SID', 'HINT', null, 'SID', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'SID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STARTUP_TIME', 'CAPTION', null, 'STARTUP_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STARTUP_TIME', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STARTUP_TIME', 'DEFINITION', null, 'vc.STARTUP_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STARTUP_TIME', 'HINT', null, 'STARTUP_TIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STARTUP_TIME', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STATE', 'CAPTION', null, 'STATE', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STATE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STATE', 'DEFINITION', null, 'vc.STATE', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STATE', 'HINT', null, 'STATE', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'STATE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_DISCARDED', 'CAPTION', null, 'TOTAL_PREFILTER_DISCARDED', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_DISCARDED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_DISCARDED', 'DEFINITION', null, 'vc.TOTAL_PREFILTER_DISCARDED', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_DISCARDED', 'HINT', null, 'TOTAL_PREFILTER_DISCARDED', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_DISCARDED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_EVALUATIONS', 'CAPTION', null, 'TOTAL_PREFILTER_EVALUATIONS', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_EVALUATIONS', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_EVALUATIONS', 'DEFINITION', null, 'vc.TOTAL_PREFILTER_EVALUATIONS', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_EVALUATIONS', 'HINT', null, 'TOTAL_PREFILTER_EVALUATIONS', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_EVALUATIONS', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_KEPT', 'CAPTION', null, 'TOTAL_PREFILTER_KEPT', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_KEPT', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_KEPT', 'DEFINITION', null, 'vc.TOTAL_PREFILTER_KEPT', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_KEPT', 'HINT', null, 'TOTAL_PREFILTER_KEPT', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', 'TOTAL_PREFILTER_KEPT', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', null, 'HEADER', null, 'v$xstream_capture', null),
('ORA2PGSYNCX', 'V_X_CAPTURE', 'DEFAULT', null, 'QUERY_TEXT', null, '(XSTREAM)select * from v$xstream_capture vc', null);
Delete from lui_t_value where form_code='V_X_PARAMETER' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='V_X_PARAMETER' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='V_X_PARAMETER' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='V_X_PARAMETER' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'V_X_PARAMETER', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'DESCRIPTION', 'ITEM', 'V_X_PARAMETER', 'RUS:DESCRIPTION;', null, 4),
('ORA2PGSYNCX', 'DISPLAY_VALUE', 'ITEM', 'V_X_PARAMETER', 'RUS:DISPLAY_VALUE;', null, 5),
('ORA2PGSYNCX', 'NAME', 'ITEM', 'V_X_PARAMETER', 'RUS:NAME;', null, 1),
('ORA2PGSYNCX', 'UPDATE_COMMENT', 'ITEM', 'V_X_PARAMETER', 'RUS:UPDATE_COMMENT;', null, 6),
('ORA2PGSYNCX', 'NUM', 'ITEM', 'V_X_PARAMETER', 'RUS:NUM;', null, 7),
('ORA2PGSYNCX', 'DEFAULT_VALUE', 'ITEM', 'V_X_PARAMETER', 'RUS:DEFAULT_VALUE;', null, 3),
('ORA2PGSYNCX', 'VALUE', 'ITEM', 'V_X_PARAMETER', 'RUS:VALUE;', null, 2);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'RUS:V$PARAMETER;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DEFAULT_VALUE', 'CAPTION', null, 'DEFAULT_VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DEFAULT_VALUE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DEFAULT_VALUE', 'DEFINITION', null, 'p.DEFAULT_VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DEFAULT_VALUE', 'HINT', null, 'DEFAULT_VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DEFAULT_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DESCRIPTION', 'CAPTION', null, 'DESCRIPTION', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DESCRIPTION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DESCRIPTION', 'DEFINITION', null, 'p.DESCRIPTION', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DESCRIPTION', 'HINT', null, 'DESCRIPTION', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DESCRIPTION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DISPLAY_VALUE', 'CAPTION', null, 'DISPLAY_VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DISPLAY_VALUE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DISPLAY_VALUE', 'DEFINITION', null, 'p.DISPLAY_VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DISPLAY_VALUE', 'HINT', null, 'DISPLAY_VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'DISPLAY_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NAME', 'CAPTION', null, 'NAME', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NAME', 'DEFINITION', null, 'p.NAME', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NAME', 'HINT', null, 'NAME', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NUM', 'CAPTION', null, 'NUM', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NUM', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NUM', 'DEFINITION', null, 'p.NUM', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NUM', 'HINT', null, 'NUM', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NUM', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'NUM', 'SORT', null, '1', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'UPDATE_COMMENT', 'CAPTION', null, 'UPDATE_COMMENT', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'UPDATE_COMMENT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'UPDATE_COMMENT', 'DEFINITION', null, 'p.UPDATE_COMMENT', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'UPDATE_COMMENT', 'HINT', null, 'UPDATE_COMMENT', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'UPDATE_COMMENT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'VALUE', 'CAPTION', null, 'VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'VALUE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'VALUE', 'DEFINITION', null, 'p.VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'VALUE', 'HINT', null, 'VALUE', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', 'VALUE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', null, 'HEADER', null, 'V$PARAMETER', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', null, 'QUERY_TEXT', null, '(XSTREAM)select * from v$parameter p', null),
('ORA2PGSYNCX', 'V_X_PARAMETER', 'DEFAULT', null, 'USER_QBE', null, replace($A941407308$	{"1":{"NAME":"%sga%"},"2":{"NAME":"memory%"},"3":{"NAME":"%streams%"}}$A941407308$,chr(13),''), null);
Delete from lui_t_value where form_code='V_X_SGA_DYNAMIC_COMP' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='V_X_SGA_DYNAMIC_COMP' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='V_X_SGA_DYNAMIC_COMP' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='V_X_SGA_DYNAMIC_COMP' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'COMPONENT', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:COMPONENT;', null, 1),
('ORA2PGSYNCX', 'CURRENT_SIZE', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:CURRENT_SIZE;', null, 2),
('ORA2PGSYNCX', 'GRANULE_SIZE', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:GRANULE_SIZE;', null, 3),
('ORA2PGSYNCX', 'LAST_OPER_MODE', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:LAST_OPER_MODE;', null, 4),
('ORA2PGSYNCX', 'LAST_OPER_TIME', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:LAST_OPER_TIME;', null, 5),
('ORA2PGSYNCX', 'LAST_OPER_TYPE', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:LAST_OPER_TYPE;', null, 6),
('ORA2PGSYNCX', 'MAX_SIZE', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:MAX_SIZE;', null, 7),
('ORA2PGSYNCX', 'MIN_SIZE', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:MIN_SIZE;', null, 8),
('ORA2PGSYNCX', 'OPER_COUNT', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:OPER_COUNT;', null, 9),
('ORA2PGSYNCX', 'USER_SPECIFIED_SIZE', 'ITEM', 'V_X_SGA_DYNAMIC_COMP', 'RUS:USER_SPECIFIED_SIZE;', null, 10);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'RUS:V$SGA_DYNAMIC_COMPONENTS;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'COMPONENT', 'CAPTION', null, 'COMPONENT', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'COMPONENT', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'COMPONENT', 'DEFINITION', null, 'sgdc.COMPONENT', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'COMPONENT', 'HINT', null, 'COMPONENT', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'COMPONENT', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'CURRENT_SIZE', 'CAPTION', null, 'CURRENT_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'CURRENT_SIZE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'CURRENT_SIZE', 'DEFINITION', null, 'sgdc.CURRENT_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'CURRENT_SIZE', 'HINT', null, 'CURRENT_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'CURRENT_SIZE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'GRANULE_SIZE', 'CAPTION', null, 'GRANULE_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'GRANULE_SIZE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'GRANULE_SIZE', 'DEFINITION', null, 'sgdc.GRANULE_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'GRANULE_SIZE', 'HINT', null, 'GRANULE_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'GRANULE_SIZE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_MODE', 'CAPTION', null, 'LAST_OPER_MODE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_MODE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_MODE', 'DEFINITION', null, 'sgdc.LAST_OPER_MODE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_MODE', 'HINT', null, 'LAST_OPER_MODE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_MODE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TIME', 'CAPTION', null, 'LAST_OPER_TIME', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TIME', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TIME', 'DEFINITION', null, 'sgdc.LAST_OPER_TIME', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TIME', 'HINT', null, 'LAST_OPER_TIME', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TIME', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TYPE', 'CAPTION', null, 'LAST_OPER_TYPE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TYPE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TYPE', 'DEFINITION', null, 'sgdc.LAST_OPER_TYPE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TYPE', 'HINT', null, 'LAST_OPER_TYPE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'LAST_OPER_TYPE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MAX_SIZE', 'CAPTION', null, 'MAX_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MAX_SIZE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MAX_SIZE', 'DEFINITION', null, 'sgdc.MAX_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MAX_SIZE', 'HINT', null, 'MAX_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MAX_SIZE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MIN_SIZE', 'CAPTION', null, 'MIN_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MIN_SIZE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MIN_SIZE', 'DEFINITION', null, 'sgdc.MIN_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MIN_SIZE', 'HINT', null, 'MIN_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'MIN_SIZE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'OPER_COUNT', 'CAPTION', null, 'OPER_COUNT', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'OPER_COUNT', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'OPER_COUNT', 'DEFINITION', null, 'sgdc.OPER_COUNT', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'OPER_COUNT', 'HINT', null, 'OPER_COUNT', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'OPER_COUNT', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'USER_SPECIFIED_SIZE', 'CAPTION', null, 'USER_SPECIFIED_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'USER_SPECIFIED_SIZE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'USER_SPECIFIED_SIZE', 'DEFINITION', null, 'sgdc.USER_SPECIFIED_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'USER_SPECIFIED_SIZE', 'HINT', null, 'USER_SPECIFIED_SIZE', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', 'USER_SPECIFIED_SIZE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', null, 'HEADER', null, 'V$SGA_DYNAMIC_COMPONENTS', null),
('ORA2PGSYNCX', 'V_X_SGA_DYNAMIC_COMP', 'DEFAULT', null, 'QUERY_TEXT', null, '(XSTREAM)select * from V$SGA_DYNAMIC_COMPONENTS sgdc', null);
Delete from lui_t_value where form_code='V_X_STREAMS_POOL_STAT' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='V_X_STREAMS_POOL_STAT' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='V_X_STREAMS_POOL_STAT' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='V_X_STREAMS_POOL_STAT' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'TOTAL_MEMORY_ALLOCATED', 'ITEM', 'V_X_STREAMS_POOL_STAT', 'RUS:TOTAL_MEMORY_ALLOCATED;', null, 2),
('ORA2PGSYNCX', 'CURRENT_SIZE', 'ITEM', 'V_X_STREAMS_POOL_STAT', 'RUS:CURRENT_SIZE;', null, 3),
('ORA2PGSYNCX', 'SGA_TARGET_VALUE', 'ITEM', 'V_X_STREAMS_POOL_STAT', 'RUS:SGA_TARGET_VALUE;', null, 4),
('ORA2PGSYNCX', 'SHRINK_PHASE', 'ITEM', 'V_X_STREAMS_POOL_STAT', 'RUS:SHRINK_PHASE;', null, 5),
('ORA2PGSYNCX', 'ADVICE_DISABLED', 'ITEM', 'V_X_STREAMS_POOL_STAT', 'RUS:ADVICE_DISABLED;', null, 6),
('ORA2PGSYNCX', 'PCT', 'ITEM', 'V_X_STREAMS_POOL_STAT', 'RUS:Percentage;ENG:Pct;', null, 1);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'RUS:Streams memory usage;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'ADVICE_DISABLED', 'CAPTION', null, 'ADVICE_DISABLED', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'ADVICE_DISABLED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'ADVICE_DISABLED', 'DEFINITION', null, 'sps.ADVICE_DISABLED', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'ADVICE_DISABLED', 'HINT', null, 'ADVICE_DISABLED', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'ADVICE_DISABLED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'CURRENT_SIZE', 'CAPTION', null, 'CURRENT_SIZE (Mb)', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'CURRENT_SIZE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'CURRENT_SIZE', 'DEFINITION', null, 'sps.CURRENT_SIZE/1024/1024', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'CURRENT_SIZE', 'FORMAT', null, 'FM999999990.0', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'CURRENT_SIZE', 'HINT', null, 'CURRENT_SIZE', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'CURRENT_SIZE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'PCT', 'CAPTION', 'Y', 'RUS:Percentage;ENG:Pct;', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'PCT', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'PCT', 'DEFINITION', null, '100*sps.TOTAL_MEMORY_ALLOCATED/sps.CURRENT_SIZE', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'PCT', 'FORMAT', null, 'FM999999990.00', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'PCT', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SGA_TARGET_VALUE', 'CAPTION', null, 'SGA_TARGET_VALUE (Mb)', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SGA_TARGET_VALUE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SGA_TARGET_VALUE', 'DEFINITION', null, 'sps.SGA_TARGET_VALUE/1024/1024', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SGA_TARGET_VALUE', 'FORMAT', null, 'FM999999990.0', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SGA_TARGET_VALUE', 'HINT', null, 'SGA_TARGET_VALUE', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SGA_TARGET_VALUE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SHRINK_PHASE', 'CAPTION', null, 'SHRINK_PHASE', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SHRINK_PHASE', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SHRINK_PHASE', 'DEFINITION', null, 'sps.SHRINK_PHASE', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SHRINK_PHASE', 'HINT', null, 'SHRINK_PHASE', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'SHRINK_PHASE', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'TOTAL_MEMORY_ALLOCATED', 'CAPTION', null, 'TOTAL_MEMORY_ALLOCATED (Mb)', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'TOTAL_MEMORY_ALLOCATED', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'TOTAL_MEMORY_ALLOCATED', 'DEFINITION', null, 'sps.TOTAL_MEMORY_ALLOCATED/1024/1024', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'TOTAL_MEMORY_ALLOCATED', 'FORMAT', null, 'FM999999990.0', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'TOTAL_MEMORY_ALLOCATED', 'HINT', null, 'TOTAL_MEMORY_ALLOCATED', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', 'TOTAL_MEMORY_ALLOCATED', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', null, 'HEADER', null, 'Streams memory usage', null),
('ORA2PGSYNCX', 'V_X_STREAMS_POOL_STAT', 'DEFAULT', null, 'QUERY_TEXT', null, '(XSTREAM)select * from V$STREAMS_POOL_STATISTICS sps', null);
Delete from lui_t_value where form_code='V_X_TX' and app_code='ORA2PGSYNCX';
Delete from lui_t_config where form_code='V_X_TX' and app_code='ORA2PGSYNCX';
Delete from lui_t_element where form_code='V_X_TX' and app_code='ORA2PGSYNCX';
Delete from lui_t_form t1 where t1.Code='V_X_TX' and t1.app_code='ORA2PGSYNCX' and not exists (select from lui_t_form t2 where t2.template=t1.code and t2.app_code=t1.app_code);
insert into lui_t_formgroup (app_code, code, name, formgroup_code, icon, seq) values
('ORA2PGSYNCX', 'ORA2PGSYNCX', 'RUS:XStream и OLR - репликация из Oracle в Postgres;', null, null, Null::lui_d_seq)
on conflict (app_code, code) do update set app_code = excluded.app_code, name = excluded.name, icon = excluded.icon, seq = excluded.seq;
insert into lui_t_form (app_code, code, formtype_code, formgroup_code, complete_time, template) values
('ORA2PGSYNCX', 'V_X_TX', 'LIST', 'ORA2PGSYNCX', null, null)
on conflict (app_code, code) do update set formtype_code = excluded.formtype_code, formgroup_code = excluded.formgroup_code, complete_time = excluded.complete_time, template = excluded.template;
insert into lui_t_element (app_code, code, etype, form_code, Name, element_code, seq) values
('ORA2PGSYNCX', 'SERIAL#', 'ITEM', 'V_X_TX', 'RUS:SERIAL#;', null, 1),
('ORA2PGSYNCX', 'SID', 'ITEM', 'V_X_TX', 'RUS:SID;', null, 2),
('ORA2PGSYNCX', 'USERNAME', 'ITEM', 'V_X_TX', 'RUS:USERNAME;', null, 3),
('ORA2PGSYNCX', 'PROGRAM', 'ITEM', 'V_X_TX', 'RUS:PROGRAM;', null, 4),
('ORA2PGSYNCX', 'MODULE', 'ITEM', 'V_X_TX', 'RUS:MODULE;', null, 5),
('ORA2PGSYNCX', 'ACTION', 'ITEM', 'V_X_TX', 'RUS:ACTION;', null, 6),
('ORA2PGSYNCX', 'CLIENT_INFO', 'ITEM', 'V_X_TX', 'RUS:CLIENT_INFO;', null, 7),
('ORA2PGSYNCX', 'START_DATE', 'ITEM', 'V_X_TX', 'RUS:START_DATE;', null, 8),
('ORA2PGSYNCX', 'STATUS', 'ITEM', 'V_X_TX', 'RUS:STATUS;', null, 9);
insert into lui_t_config (app_code, form_code, code, name, config_code, notes) values ('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'RUS:Transactions;', null, null);
insert into lui_t_value (app_code, form_code, config_code, element_code, property_code, Is_Multilang, value, valueb) values
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'ACTION', 'CAPTION', null, 'ACTION', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'ACTION', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'ACTION', 'DEFINITION', null, 's.ACTION', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'ACTION', 'HINT', null, 'ACTION', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'ACTION', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'CLIENT_INFO', 'CAPTION', null, 'CLIENT_INFO', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'CLIENT_INFO', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'CLIENT_INFO', 'DEFINITION', null, 's.CLIENT_INFO', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'CLIENT_INFO', 'HINT', null, 'CLIENT_INFO', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'CLIENT_INFO', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'MODULE', 'CAPTION', null, 'MODULE', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'MODULE', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'MODULE', 'DEFINITION', null, 's.MODULE', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'MODULE', 'HINT', null, 'MODULE', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'MODULE', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'PROGRAM', 'CAPTION', null, 'PROGRAM', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'PROGRAM', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'PROGRAM', 'DEFINITION', null, 's.PROGRAM', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'PROGRAM', 'HINT', null, 'PROGRAM', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'PROGRAM', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SERIAL#', 'CAPTION', null, 'SERIAL#', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SERIAL#', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SERIAL#', 'DEFINITION', null, 's.SERIAL#', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SERIAL#', 'HINT', null, 'SERIAL#', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SERIAL#', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SID', 'CAPTION', null, 'SID', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SID', 'DATA_TYPE', null, 'NUMBER', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SID', 'DEFINITION', null, 's.SID', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SID', 'HINT', null, 'SID', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'SID', 'ITEM_TEMPLATE', null, 'ITEM_NUMBER', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'START_DATE', 'CAPTION', null, 'START_DATE', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'START_DATE', 'DATA_TYPE', null, 'DATETIME', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'START_DATE', 'DEFINITION', null, 't.START_DATE', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'START_DATE', 'HINT', null, 'START_DATE', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'START_DATE', 'ITEM_TEMPLATE', null, 'ITEM_DATETIME', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'STATUS', 'CAPTION', null, 'STATUS', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'STATUS', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'STATUS', 'DEFINITION', null, 't.STATUS', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'STATUS', 'HINT', null, 'STATUS', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'STATUS', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'USERNAME', 'CAPTION', null, 'USERNAME', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'USERNAME', 'DATA_TYPE', null, 'CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'USERNAME', 'DEFINITION', null, 's.USERNAME', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'USERNAME', 'HINT', null, 'USERNAME', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', 'USERNAME', 'ITEM_TEMPLATE', null, 'ITEM_CHAR', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', null, 'HEADER', null, 'Transactions', null),
('ORA2PGSYNCX', 'V_X_TX', 'DEFAULT', null, 'QUERY_TEXT', null, '(XSTREAM)select * from v$transaction t inner join v$session s on t.addr = s.taddr', null);
commit;