From f802477cf28ea7edf00027edcc59591f0c718d71 Mon Sep 17 00:00:00 2001 From: valdevir Date: Fri, 10 Dec 2021 21:26:45 +0000 Subject: [PATCH] fixes bug#23635 qua: dev:Valdir git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@109989 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20211207_1433__mantis23635.sql | 24 +++++++++++++++++++ .../migration/V20211207_1433__mantis23635.sql | 21 ++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/db/migration/V20211207_1433__mantis23635.sql create mode 100644 src/db/postgresql/migration/V20211207_1433__mantis23635.sql diff --git a/src/db/migration/V20211207_1433__mantis23635.sql b/src/db/migration/V20211207_1433__mantis23635.sql new file mode 100644 index 000000000..89d4df675 --- /dev/null +++ b/src/db/migration/V20211207_1433__mantis23635.sql @@ -0,0 +1,24 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO_CHECKIN ADD INDCHECKINBLOQUEADO NUMBER(1,0)'; + exception when column_exists then null; +end; +/ +declare +begin + execute immediate 'INSERT INTO FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) +values (FUNCION_SISTEMA_SEQ.NEXTVAL,''1'',''PERMITE BLOQUEAR/LIBERAR CHECKIN'', +''COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENUCHECKIN.CHECKINBLOQUEADO'', +1,sysdate,1)'; + exception when others then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD INDCHECKINBLOQUEADOREMARCACAO NUMBER(1,0) DEFAULT 0 NOT NULL'; + exception when column_exists then null; +end; diff --git a/src/db/postgresql/migration/V20211207_1433__mantis23635.sql b/src/db/postgresql/migration/V20211207_1433__mantis23635.sql new file mode 100644 index 000000000..2ff23f156 --- /dev/null +++ b/src/db/postgresql/migration/V20211207_1433__mantis23635.sql @@ -0,0 +1,21 @@ +DO $$ +BEGIN + ALTER TABLE BOLETO_CHECKIN ADD INDCHECKINBLOQUEADO NUMBER(1); + exception when duplicate_column then null; +END +$$; +/ +DO $$ +BEGIN + Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) + values (FUNCION_SISTEMA_SEQ.nextval,'1','PERMITE BLOQUEAR/LIBERAR CHECKIN','COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENUCHECKIN.CHECKINBLOQUEADO', '1',sysdate,'-1'); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD INDCHECKINBLOQUEADOREMARCACAO NUMBER(1); + exception when duplicate_column then null; +END +$$;