diff --git a/src/db/migration/V20181004_1120__mantis10918.sql b/src/db/migration/V20181004_1120__mantis10918.sql new file mode 100644 index 000000000..19758c967 --- /dev/null +++ b/src/db/migration/V20181004_1120__mantis10918.sql @@ -0,0 +1,27 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE CONF_RESTRICAO_VENDAWEB + (CONFRESTRICAOVENDAWEB_ID NUMBER(7,0) NOT NULL ENABLE, + EMPRESA_ID NUMBER(7,0), + VALOR NUMBER(7,2), + ACTIVO NUMBER(1,0), + FECMODIF DATE, + USUARIO_ID NUMBER(7,0), + PRIMARY KEY (CONFRESTRICAOVENDAWEB_ID), + FOREIGN KEY (EMPRESA_ID) + REFERENCES EMPRESA (EMPRESA_ID) ENABLE + )'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE CONF_RESTRICAO_VENDAWEB_SEQ MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 101 CACHE 20 NOORDER NOCYCLE'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20181004_1121__mantis10918.sql b/src/db/migration/V20181004_1121__mantis10918.sql new file mode 100644 index 000000000..c9c7e1689 --- /dev/null +++ b/src/db/migration/V20181004_1121__mantis10918.sql @@ -0,0 +1,7 @@ +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,''2'',''VDA > AUTORIZACAO > CONFIGURAR RESTRICAO DE CANAL DE VENDA EMPRESA VALOR MINIMO'',''COM.RJCONSULTORES.ADMINISTRACION.GUI.ESQUEMAOPERACIONAL.MENU.CONFRESTRICAOCANALVENTAEMPRESAVALORMIN'',''1'',sysdate,''1'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file