Merge pull request 'bug#al-2761' (!47) from AL-2761 into master
Reviewed-on: utilidades/Flyway#47 Reviewed-by: Julio Heredia <julio@rjconsultores.com.br>master
commit
013d81a8d9
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>Flyway</artifactId>
|
<artifactId>Flyway</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.4.2</version>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
|
|
|
@ -1,12 +1,120 @@
|
||||||
declare
|
declare
|
||||||
object_exists exception;
|
object_exists exception;
|
||||||
except_00957 exception;
|
except_01451 exception;
|
||||||
|
except_01442 exception;
|
||||||
pragma exception_init (object_exists , -01430);
|
except_01440 exception;
|
||||||
pragma exception_init (except_00957 , -00957);
|
|
||||||
begin
|
pragma exception_init (object_exists , -01430);
|
||||||
execute immediate 'ALTER TABLE PRICING_OCUPA_ANTECIPA MODIFY IMPORTE NUMBER(10,2)';
|
pragma exception_init (except_01451 , -01451);
|
||||||
exception
|
pragma exception_init (except_01442 , -01442);
|
||||||
when object_exists then null;
|
pragma exception_init (except_01440 , -01440);
|
||||||
when except_00957 then null;
|
begin
|
||||||
end;
|
execute immediate 'ALTER TABLE PRICING_OCUPA_ANTECIPA ADD (IMPORTE_AUX NUMBER(10,2))';
|
||||||
|
exception
|
||||||
|
when object_exists then null;
|
||||||
|
when except_01451 then null;
|
||||||
|
when except_01442 then null;
|
||||||
|
when except_01440 then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
declare
|
||||||
|
object_exists exception;
|
||||||
|
except_01451 exception;
|
||||||
|
except_01442 exception;
|
||||||
|
except_01440 exception;
|
||||||
|
|
||||||
|
pragma exception_init (object_exists , -01430);
|
||||||
|
pragma exception_init (except_01451 , -01451);
|
||||||
|
pragma exception_init (except_01442 , -01442);
|
||||||
|
pragma exception_init (except_01440 , -01440);
|
||||||
|
begin
|
||||||
|
execute immediate 'UPDATE PRICING_OCUPA_ANTECIPA SET IMPORTE_AUX = IMPORTE';
|
||||||
|
exception
|
||||||
|
when object_exists then null;
|
||||||
|
when except_01451 then null;
|
||||||
|
when except_01442 then null;
|
||||||
|
when except_01440 then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
declare
|
||||||
|
object_exists exception;
|
||||||
|
except_01451 exception;
|
||||||
|
except_01442 exception;
|
||||||
|
except_01440 exception;
|
||||||
|
except_00904 exception;
|
||||||
|
|
||||||
|
pragma exception_init (object_exists , -01430);
|
||||||
|
pragma exception_init (except_01451 , -01451);
|
||||||
|
pragma exception_init (except_01442 , -01442);
|
||||||
|
pragma exception_init (except_01442 , -01440);
|
||||||
|
pragma exception_init (except_00904 , -00904);
|
||||||
|
begin
|
||||||
|
execute immediate 'ALTER TABLE PRICING_OCUPA_ANTECIPA DROP COLUMN IMPORTE';
|
||||||
|
exception
|
||||||
|
when object_exists then null;
|
||||||
|
when except_01451 then null;
|
||||||
|
when except_01442 then null;
|
||||||
|
when except_01440 then null;
|
||||||
|
when except_00904 then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
declare
|
||||||
|
object_exists exception;
|
||||||
|
except_01451 exception;
|
||||||
|
except_01442 exception;
|
||||||
|
except_01440 exception;
|
||||||
|
|
||||||
|
pragma exception_init (object_exists , -01430);
|
||||||
|
pragma exception_init (except_01451 , -01451);
|
||||||
|
pragma exception_init (except_01442 , -01442);
|
||||||
|
pragma exception_init (except_01440 , -01440);
|
||||||
|
begin
|
||||||
|
execute immediate 'ALTER TABLE PRICING_OCUPA_ANTECIPA ADD (IMPORTE NUMBER(10,2))';
|
||||||
|
exception
|
||||||
|
when object_exists then null;
|
||||||
|
when except_01451 then null;
|
||||||
|
when except_01442 then null;
|
||||||
|
when except_01440 then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
declare
|
||||||
|
object_exists exception;
|
||||||
|
except_01451 exception;
|
||||||
|
except_01442 exception;
|
||||||
|
except_01440 exception;
|
||||||
|
|
||||||
|
pragma exception_init (object_exists , -01430);
|
||||||
|
pragma exception_init (except_01451 , -01451);
|
||||||
|
pragma exception_init (except_01442 , -01442);
|
||||||
|
pragma exception_init (except_01440 , -01440);
|
||||||
|
begin
|
||||||
|
execute immediate 'UPDATE PRICING_OCUPA_ANTECIPA SET IMPORTE = IMPORTE_AUX';
|
||||||
|
exception
|
||||||
|
when object_exists then null;
|
||||||
|
when except_01451 then null;
|
||||||
|
when except_01442 then null;
|
||||||
|
when except_01440 then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
declare
|
||||||
|
object_exists exception;
|
||||||
|
except_01451 exception;
|
||||||
|
except_01442 exception;
|
||||||
|
except_01440 exception;
|
||||||
|
except_00904 exception;
|
||||||
|
|
||||||
|
pragma exception_init (object_exists , -01430);
|
||||||
|
pragma exception_init (except_01451 , -01451);
|
||||||
|
pragma exception_init (except_01442 , -01442);
|
||||||
|
pragma exception_init (except_01442 , -01440);
|
||||||
|
pragma exception_init (except_00904 , -00904);
|
||||||
|
begin
|
||||||
|
execute immediate 'ALTER TABLE PRICING_OCUPA_ANTECIPA DROP COLUMN IMPORTE_AUX';
|
||||||
|
exception
|
||||||
|
when object_exists then null;
|
||||||
|
when except_01451 then null;
|
||||||
|
when except_01442 then null;
|
||||||
|
when except_01440 then null;
|
||||||
|
when except_00904 then null;
|
||||||
|
end;
|
||||||
|
/
|
|
@ -1,5 +1,35 @@
|
||||||
DO $$
|
DO $$
|
||||||
BEGIN
|
BEGIN
|
||||||
ALTER TABLE PRICING_OCUPA_ANTECIPA MODIFY IMPORTE NUMBER(10,2);
|
ALTER TABLE PRICING_OCUPA_ANTECIPA ADD (IMPORTE_AUX NUMBER(10,2));
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
/
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
UPDATE PRICING_OCUPA_ANTECIPA SET IMPORTE_AUX = IMPORTE;
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
/
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE PRICING_OCUPA_ANTECIPA DROP COLUMN IMPORTE;
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
/
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE PRICING_OCUPA_ANTECIPA ADD (IMPORTE NUMBER(10,2));
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
/
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
UPDATE PRICING_OCUPA_ANTECIPA SET IMPORTE = IMPORTE_AUX;
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
/
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE PRICING_OCUPA_ANTECIPA DROP COLUMN IMPORTE_AUX;
|
||||||
END
|
END
|
||||||
$$;
|
$$;
|
||||||
|
|
Loading…
Reference in New Issue