diff --git a/pom.xml b/pom.xml index 3e0249f45..4108b4487 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.0.18 + 1.0.19 diff --git a/src/db/migration/V20230131_1017__AL2105.sql b/src/db/migration/V20230131_1017__AL2105.sql new file mode 100644 index 000000000..e765ed347 --- /dev/null +++ b/src/db/migration/V20230131_1017__AL2105.sql @@ -0,0 +1,63 @@ +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 'UPDATE ESTACION_SITEF SET TIPO_INTEGRACAO = ''SITEF'' WHERE TIPO_INTEGRACAO = ''Sitef'''; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; +/ +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 'UPDATE ESTACION_SITEF SET TIPO_INTEGRACAO = ''PAYGO'' WHERE TIPO_INTEGRACAO = ''Paygo'''; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; +/ +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 'UPDATE ESTACION_SITEF SET TIPO_INTEGRACAO = ''GRANITO'' WHERE TIPO_INTEGRACAO = ''Granito'''; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; +/ +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 'UPDATE ESTACION_SITEF SET TIPO_INTEGRACAO = ''ADYEN'' WHERE TIPO_INTEGRACAO = ''Adyen'''; + 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/V20230131_1017__AL2105.sql b/src/db/postgresql/migration/V20230131_1017__AL2105.sql new file mode 100644 index 000000000..c2d439abc --- /dev/null +++ b/src/db/postgresql/migration/V20230131_1017__AL2105.sql @@ -0,0 +1,22 @@ +DO $$ +BEGIN + UPDATE ESTACION_SITEF SET TIPO_INTEGRACAO = 'SITEF' WHERE TIPO_INTEGRACAO = 'Sitef'; +END +$$; +/ +DO $$ +BEGIN + UPDATE ESTACION_SITEF SET TIPO_INTEGRACAO = 'PAYGO' WHERE TIPO_INTEGRACAO = 'Paygo'; +END +$$; +/DO $$ +BEGIN + UPDATE ESTACION_SITEF SET TIPO_INTEGRACAO = 'GRANITO' WHERE TIPO_INTEGRACAO = 'Granito'; +END +$$; +/DO $$ +BEGIN + UPDATE ESTACION_SITEF SET TIPO_INTEGRACAO = 'ADYEN' WHERE TIPO_INTEGRACAO = 'Adyen'; +END +$$; +