diff --git a/src/db/migration/V20170609_1701__mantis9181.sql b/src/db/migration/V20170609_1701__mantis9181.sql new file mode 100644 index 000000000..fb5b1880c --- /dev/null +++ b/src/db/migration/V20170609_1701__mantis9181.sql @@ -0,0 +1,27 @@ +declare + table_exists exception; + pragma exception_init (table_exists , -00955); +begin + execute immediate' + CREATE TABLE MOTIVO_DEVOLUCAO_BILHETE +( + MOTIVODEVOLUCAOBILHETE_ID NUMBER(15) PRIMARY KEY NOT NULL, + DESCMOTIVO VARCHAR2(50) NULL, + ACTIVO NUMBER(1) NULL, + USUARIO_ID NUMBER(7) NULL, + FECMODIF DATE NULL + +)'; + exception when table_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE MOTIVO_DEVOLUCAO_BILHETE_SEQ + MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 + START WITH 1 CACHE 20 NOORDER NOCYCLE'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20170609_1922__mantis9181.sql b/src/db/migration/V20170609_1922__mantis9181.sql new file mode 100644 index 000000000..7bbccc731 --- /dev/null +++ b/src/db/migration/V20170609_1922__mantis9181.sql @@ -0,0 +1,8 @@ +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 >> CONFIG COMERCIAL > MOTIVO DEVOLUCAO BILHETE'',''COM.RJCONSULTORES.ADMINISTRACION.GUI.CATALOGO.MENU.MOTIVOSDELADEVOLUCAOBILHETE'',1,SYSDATE,1)'; + exception when dup_val_on_index then null; +end; \ No newline at end of file