From 8612a51679ca8da741022410f4d396533248f724 Mon Sep 17 00:00:00 2001 From: "wallace.henrique" Date: Tue, 21 Nov 2023 11:05:23 -0300 Subject: [PATCH] fixes bug#AL-3524 --- src/db/migration/V20231114_1025__AL3499.sql | 7 ------- src/db/migration/V20231114_1025__AL3524.sql | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) delete mode 100644 src/db/migration/V20231114_1025__AL3499.sql create mode 100644 src/db/migration/V20231114_1025__AL3524.sql diff --git a/src/db/migration/V20231114_1025__AL3499.sql b/src/db/migration/V20231114_1025__AL3499.sql deleted file mode 100644 index 20415981f..000000000 --- a/src/db/migration/V20231114_1025__AL3499.sql +++ /dev/null @@ -1,7 +0,0 @@ -declare - column_exists exception; - pragma exception_init (column_exists , -01430); -begin - execute immediate 'ALTER TABLE PUNTO_VENTA ADD INDTAXACONVORGAOCONCEDENTE NUMBER(1,0)' ; - exception when column_exists then null; -end; diff --git a/src/db/migration/V20231114_1025__AL3524.sql b/src/db/migration/V20231114_1025__AL3524.sql new file mode 100644 index 000000000..6eee03438 --- /dev/null +++ b/src/db/migration/V20231114_1025__AL3524.sql @@ -0,0 +1,19 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE PUNTO_VENTA ADD INDTAXACONVORGAOCONCEDENTE NUMBER(1,0)' ; + exception when column_exists then null; +end; +/ +declare + object_exists exception; + except_00957 exception; + pragma exception_init (object_exists , -01430); + pragma exception_init (except_00957 , -00957); +begin + execute immediate 'ALTER TABLE PUNTO_VENTA RENAME COLUMN INDTAXACONVENIENCIAORGAOCONCEDENTE TO INDTAXACONVORGAOCONCEDENTE'; + exception + when object_exists then null; + when except_00957 then null; +end; \ No newline at end of file