43 lines
1.4 KiB
MySQL
43 lines
1.4 KiB
MySQL
declare
|
|
begin
|
|
execute immediate
|
|
'INSERT INTO FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID)
|
|
values (FUNCION_SISTEMA_SEQ.NEXTVAL,''1'',''ADM > COMISSAO >> TIPO INFORMATIVO'',
|
|
''COM.RJCONSULTORES.ADMINISTRACION.GUI.COMISSAO.MENU.TIPOINFORMATIVO'',
|
|
''1'',to_date(''15/04/16'',''DD/MM/RR''),''1'')';
|
|
exception when others then null;
|
|
end;
|
|
/
|
|
declare
|
|
object_exists exception;
|
|
pragma exception_init (object_exists , -00955);
|
|
begin
|
|
execute immediate
|
|
'CREATE TABLE TIPO_INFORMATIVO (
|
|
TIPOINFORMATIVO_ID NUMBER(7,0) NOT NULL ENABLE,
|
|
DESCTIPO VARCHAR2(500 BYTE),
|
|
ACTIVO NUMBER(1,0),
|
|
FECMODIF DATE,
|
|
USUARIO_ID NUMBER(7,0),
|
|
CONSTRAINT "PK_TIPOINFORMATIVO" PRIMARY KEY ("TIPOINFORMATIVO_ID"),
|
|
CONSTRAINT "FK_TIPOINFORMATIVO_USUARIO" FOREIGN KEY ("USUARIO_ID") REFERENCES USUARIO("USUARIO_ID")
|
|
)';
|
|
exception when object_exists then null;
|
|
end;
|
|
/
|
|
declare
|
|
object_exists exception;
|
|
pragma exception_init (object_exists , -00955);
|
|
begin
|
|
execute immediate 'CREATE SEQUENCE TIPO_INFORMATIVO_SEQ';
|
|
exception when object_exists then null;
|
|
end;
|
|
/
|
|
declare
|
|
column_exists exception;
|
|
pragma exception_init (column_exists , -01430);
|
|
begin
|
|
execute immediate 'ALTER TABLE LOG_CONFERENCIA ADD TIPOINFORMATIVOCOMISSAO_ID NUMBER(7,0)';
|
|
exception when column_exists then null;
|
|
end;
|