diff --git a/src/db/migration/V20210521_1034__mantis22367.sql b/src/db/migration/V20210521_1034__mantis22367.sql new file mode 100644 index 000000000..36702c8dd --- /dev/null +++ b/src/db/migration/V20210521_1034__mantis22367.sql @@ -0,0 +1,23 @@ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDPERMITETROCA NUMBER(1,0), INDPERMITETRANSFERENCIA NUMBER(1,0) ) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'update CATEGORIA_DESCUENTO set INDPERMITETROCA = INDPERMITETROCATRANSFERENCIA , INDPERMITETRANSFERENCIA = INDPERMITETROCATRANSFERENCIA'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20210521_1506__mantis22377.sql b/src/db/migration/V20210521_1506__mantis22377.sql new file mode 100644 index 000000000..f58f64075 --- /dev/null +++ b/src/db/migration/V20210521_1506__mantis22377.sql @@ -0,0 +1,15 @@ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); +begin + execute immediate 'ALTER TABLE EMPRESA ADD (INDNAOIMPRIMECUPOMVENDABERTO NUMBER(1,0), INDNAOIMPRIMECUPOMCONFABERTO NUMBER(1,0) ) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210521_1034__mantis22367.sql b/src/db/postgresql/migration/V20210521_1034__mantis22367.sql new file mode 100644 index 000000000..e3444964c --- /dev/null +++ b/src/db/postgresql/migration/V20210521_1034__mantis22367.sql @@ -0,0 +1,14 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD (INDPERMITETROCA NUMBER(1,0), INDPERMITETRANSFERENCIA NUMBER(1,0) ); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ + +DO $$ +BEGIN + update CATEGORIA_DESCUENTO set INDPERMITETROCA = INDPERMITETROCATRANSFERENCIA , INDPERMITETRANSFERENCIA = INDPERMITETROCATRANSFERENCIA; + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210521_1506__mantis22377.sql b/src/db/postgresql/migration/V20210521_1506__mantis22377.sql new file mode 100644 index 000000000..8935730f1 --- /dev/null +++ b/src/db/postgresql/migration/V20210521_1506__mantis22377.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD (INDNAOIMPRIMECUPOMVENDABERTO NUMBER(1,0), INDNAOIMPRIMECUPOMCONFABERTO NUMBER(1,0)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file