From 0b03075daec3f93264fd31aaacac3a873751ef5b Mon Sep 17 00:00:00 2001 From: "lucas.taia" Date: Thu, 20 Jul 2017 23:54:35 +0000 Subject: [PATCH] bug #9287 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@71711 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20170720_2033__mantis9287.sql | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/db/migration/V20170720_2033__mantis9287.sql diff --git a/src/db/migration/V20170720_2033__mantis9287.sql b/src/db/migration/V20170720_2033__mantis9287.sql new file mode 100644 index 000000000..93c285796 --- /dev/null +++ b/src/db/migration/V20170720_2033__mantis9287.sql @@ -0,0 +1,47 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE "FISCAL_IMPRESSORA_ESTADO" + ( + "FISCALIMPESTADO_ID" NUMBER(15,0) NOT NULL ENABLE, + "FISCALIMPRESSORA_ID" NUMBER(7,0) NOT NULL ENABLE, + "ESTADO_ID" NUMBER(7,0) NOT NULL ENABLE, + "ACTIVO" NUMBER(1,0), + "FECMODIF" DATE, + "USUARIO_ID" NUMBER(7,0), + CONSTRAINT "FISCAL_IMPRESSORA_ESTADO_PK" PRIMARY KEY ("FISCALIMPESTADO_ID") + )'; + + execute immediate + 'CREATE SEQUENCE FISCAL_IMPRESSORA_ESTADO_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE'; + + exception when object_exists then null; +end; + +declare + object_exists exception; + pragma exception_init (object_exists , -01430); +begin + execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (ESTADOLACRE_ID NUMBER(7) )'; + exception when object_exists then null; +end; + +declare + object_exists exception; + pragma exception_init (object_exists , -01430); +begin + execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (EMPRESA_ID NUMBER(7) )'; + exception when object_exists then null; +end; + +declare + object_exists exception; + pragma exception_init (object_exists , -01430); +begin + execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (INDBLOQUEAECF NUMBER(7) )'; + exception when object_exists then null; +end; + +