diff --git a/src/db/migration/V20220614_1101__mantis24629.sql b/src/db/migration/V20220614_1101__mantis24629.sql new file mode 100644 index 000000000..819d57449 --- /dev/null +++ b/src/db/migration/V20220614_1101__mantis24629.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD TIPOOCUPACION_ID NUMBER(7,0)'; + exception when object_exists then null; +end; diff --git a/src/db/migration/V20220614_1509__mantis24629.sql b/src/db/migration/V20220614_1509__mantis24629.sql new file mode 100644 index 000000000..db87a1c20 --- /dev/null +++ b/src/db/migration/V20220614_1509__mantis24629.sql @@ -0,0 +1,6 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'Insert into TIPO_OCUPACION (TIPOOCUPACION_ID,CVETIPOOCUPACION,DESCTIPO,EQUIVALENCIA_ID,ACTIVO,FECMODIF,USUARIO_ID) values (TIPO_OCUPACION_SEQ.nextval, null,''POLICIAL MILITAR'',null,1,sysdate,1)'; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220614_1101__mantis24629.sql b/src/db/postgresql/migration/V20220614_1101__mantis24629.sql new file mode 100644 index 000000000..95f555305 --- /dev/null +++ b/src/db/postgresql/migration/V20220614_1101__mantis24629.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD TIPOOCUPACION_ID NUMBER(7,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220614_1509__mantis24629.sql b/src/db/postgresql/migration/V20220614_1509__mantis24629.sql new file mode 100644 index 000000000..626a6ece1 --- /dev/null +++ b/src/db/postgresql/migration/V20220614_1509__mantis24629.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + Insert into TIPO_OCUPACION (TIPOOCUPACION_ID,CVETIPOOCUPACION,DESCTIPO,EQUIVALENCIA_ID,ACTIVO,FECMODIF,USUARIO_ID) values (TIPO_OCUPACION_SEQ.nextval, null,''POLICIAL MILITAR'',null,1,sysdate,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file