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
master
lucas.taia 2019-07-23 21:01:04 +00:00
parent 7d6d4aa361
commit 14c8c3ff49
1 changed files with 35 additions and 0 deletions

View File

@ -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;