From 14c8c3ff495a626d2e009dc9444c780827b74542 Mon Sep 17 00:00:00 2001 From: "lucas.taia" Date: Tue, 23 Jul 2019 21:01:04 +0000 Subject: [PATCH] fixes bug#14878 dev:lucas qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@96035 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20190723_1722__Mantis14878.sql | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/db/migration/V20190723_1722__Mantis14878.sql diff --git a/src/db/migration/V20190723_1722__Mantis14878.sql b/src/db/migration/V20190723_1722__Mantis14878.sql new file mode 100644 index 000000000..b7e3ba507 --- /dev/null +++ b/src/db/migration/V20190723_1722__Mantis14878.sql @@ -0,0 +1,35 @@ +declare + table_exists exception; + pragma exception_init (table_exists , -00955); +begin + execute immediate + 'CREATE TABLE "IMAGEM" ("IMAGEM_ID" NUMBER(7,0) NOT NULL ENABLE, "IMAGEM" BLOB, "ACTIVO" NUMBER(1,0), "FECMODIF" DATE, "USUARIO_ID" NUMBER(7,0), "NOMBIMAGEM" VARCHAR2(150 BYTE), CONSTRAINT "IMAGEM_PK" PRIMARY KEY ("IMAGEM_ID"))'; + exception when table_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE IMAGEM_SEQ'; + exception when object_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE INDEX IDX_NOMBIMAGEM ON IMAGEM (NOMBIMAGEM ASC)'; + exception when object_exists then null; +end; +/ + +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) VALUES (FUNCION_SISTEMA_SEQ.nextval,''1'',''ADM > CATALOGOS > IMAGEM'',''COM.RJCONSULTORES.ADMINISTRACION.GUI.CATALOGO.MENU.IMAGEM'',''1'',null,''2'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file