diff --git a/pom.xml b/pom.xml index c95074058..cafdf8ea5 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,10 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd "> 4.0.0 br.com.rjconsultores Flyway - 1.17.0 + 1.20.0 diff --git a/src/db/migration/V20231109_1110__AL-3470.sql b/src/db/migration/V20231109_1110__AL-3470.sql new file mode 100644 index 000000000..7aa3aaa98 --- /dev/null +++ b/src/db/migration/V20231109_1110__AL-3470.sql @@ -0,0 +1,13 @@ +declare + object_exists exception; + except_00957 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_00957 , -00957); +begin + execute immediate 'ALTER TABLE EMPRESA ADD (LICENCA VARCHAR(500))'; + exception + when object_exists then null; + when except_00957 then null; +end; +/ \ No newline at end of file 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 diff --git a/src/db/migration/V2023_0914__AL-3254.sql b/src/db/migration/V2023_0914__AL-3254.sql new file mode 100644 index 000000000..cdda490dd --- /dev/null +++ b/src/db/migration/V2023_0914__AL-3254.sql @@ -0,0 +1,28 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE TABLE HEADER_ESQUEMA_CORRIDA + ( + "HEADERESQUEMACORRIDA_ID" NUMBER(7,0) NOT NULL ENABLE, + "SEQUENCIA_HEADER" VARCHAR2(50 BYTE) ) + '; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE "HEADER_ESQUEMA_CORRIDA_SEQ" MINVALUE 1 MAXVALUE 999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE'; + exception when object_exists then null; +end; +/ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'Insert into HEADER_ESQUEMA_CORRIDA (HEADERESQUEMACORRIDA_ID, SEQUENCIA_HEADER) + values (1,''1,2,3,4,5,6,7,8,9,10,11,12,13,14,15'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file