From fc1cc16e5bedd8f06def14ad56f1b53d41f49e53 Mon Sep 17 00:00:00 2001 From: "bruno.neves" Date: Fri, 7 Jul 2017 22:40:22 +0000 Subject: [PATCH] bug #0009181 bug #0009182 - git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@71155 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20170609_1701__mantis9181.sql | 27 +++++++++++++++++++ .../migration/V20170609_1922__mantis9181.sql | 8 ++++++ 2 files changed, 35 insertions(+) create mode 100644 src/db/migration/V20170609_1701__mantis9181.sql create mode 100644 src/db/migration/V20170609_1922__mantis9181.sql 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