diff --git a/pom.xml b/pom.xml
index 4eabce60a..343e79f12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
br.com.rjconsultores
Flyway
- 1.0.6
+ 1.0.7
diff --git a/src/db/migration/V20221128_1235__AL1786.sql b/src/db/migration/V20221128_1235__AL1786.sql
new file mode 100644
index 000000000..39421f455
--- /dev/null
+++ b/src/db/migration/V20221128_1235__AL1786.sql
@@ -0,0 +1,30 @@
+declare
+ object_exists exception;
+ pragma exception_init (object_exists , -00955);
+begin
+ execute immediate
+ 'CREATE TABLE EMPRESA_CIELOLINK_CONFIG
+ (
+ EMPRESACIELOLINK_ID NUMBER(7, 0) NOT NULL
+ , EMPRESA_ID NUMBER(7, 0)
+ , CLIENT_ID VARCHAR2(50 BYTE)
+ , MERCHANT_ID VARCHAR2(50 BYTE)
+ , SECRET VARCHAR2(50 BYTE)
+ , MINUTOS_CANCELA NUMBER(7,0)
+ , URL VARCHAR2(50 BYTE)
+ , ACTIVO NUMBER(1,0)
+ , FECMODIF DATE
+ , USUARIO_ID NUMBER(7,0)
+ , CONSTRAINT EMPRESA_CIELOLINK_CONFIG PRIMARY KEY ( EMPRESACIELOLINK_ID ) ENABLE ) ';
+
+ exception when object_exists then null;
+end;
+/
+declare
+ object_exists exception;
+ pragma exception_init (object_exists , -00955);
+begin
+ execute immediate
+ 'CREATE SEQUENCE EMP_CIELOLINK_CONFIG_SEQ';
+ exception when object_exists then null;
+end;
diff --git a/src/db/migration/V20221207_1034__AL-1860.sql b/src/db/migration/V20221207_1034__AL-1860.sql
new file mode 100644
index 000000000..83ef67012
--- /dev/null
+++ b/src/db/migration/V20221207_1034__AL-1860.sql
@@ -0,0 +1,13 @@
+-- INSERT / UPDATE
+declare
+ dup_val_on_index exception;
+ except_02291 exception;
+
+ pragma exception_init (dup_val_on_index , -00001);
+ pragma exception_init (except_02291 , -02291);
+begin
+ execute immediate 'Insert into AUTORIZACION (AUTORIZACION_ID,NOMBAUTORIZACION,DESCAUTORIZACION,ACTIVO,FECMODIF,USUARIO_ID) values (AUTORIZACION_SEQ.NEXTVAL,''AUT_MAPA_LGPD'',''AUTORIZACAO PARA EXIBIR DADOS LGPD NO MAPA DE VIAGEM'',1,SYSDATE,1)';
+ exception
+ when dup_val_on_index then null;
+ when except_02291 then null;
+end;
\ No newline at end of file
diff --git a/src/db/migration/V20221221_1650__AL-1786.sql b/src/db/migration/V20221221_1650__AL-1786.sql
new file mode 100644
index 000000000..98ef59e1f
--- /dev/null
+++ b/src/db/migration/V20221221_1650__AL-1786.sql
@@ -0,0 +1,28 @@
+-- INSERT / UPDATE
+declare
+ dup_val_on_index exception;
+ except_02291 exception;
+
+ pragma exception_init (dup_val_on_index , -00001);
+ pragma exception_init (except_02291 , -02291);
+begin
+ execute immediate 'Insert into empresa_cielolink_config
+ (empresacielolink_id, empresa_id, merchant_id, minutos_cancela, client_id, url, secret, usuario_id, fecmodif, activo)
+ select
+ EMP_CIELOLINK_CONFIG_SEQ.nextval, empresa_id, merchant_id , minutos , client_id , url , secret , usuario_id , fecmodif, activo from
+ (
+ select
+ empresa_id,
+ (SELECT valorconstante FROM constante where nombconstante like ''MERCHANT_ID_CIELO_LINK'') as merchant_id,
+ (SELECT valorconstante FROM constante where nombconstante like ''MINUTOS_EXPIRACAO_CIELO_LINK'') as minutos,
+ (SELECT valorconstante FROM constante where nombconstante like ''CLIENT_ID_CIELO_LINK'') as client_id,
+ (SELECT valorconstante FROM constante where nombconstante like ''URL_CIELO_LINK'') as url,
+ (SELECT valorconstante FROM constante where nombconstante like ''SECRET_CIELO_LINK'') as secret,
+ 1 as usuario_id,
+ sysdate as fecmodif,
+ 1 as activo
+ from empresa where activo = 1 order by empresa_id) dados';
+ exception
+ when dup_val_on_index then null;
+ when except_02291 then null;
+end;
\ No newline at end of file
diff --git a/src/db/postgresql/migration/V20221128_1234__AL1183.sql b/src/db/postgresql/migration/V20221128_1234__AL1183.sql
new file mode 100644
index 000000000..49379b847
--- /dev/null
+++ b/src/db/postgresql/migration/V20221128_1234__AL1183.sql
@@ -0,0 +1,28 @@
+declare
+ object_exists exception;
+ pragma exception_init (object_exists , -00955);
+begin
+ execute immediate
+ 'CREATE TABLE EMPRESA_EREDE_CONFIG
+ (
+ EMPRESAEREDE_ID NUMBER(7, 0) NOT NULL
+ , EMPRESA_ID NUMBER(7, 0)
+ , FILIATION VARCHAR2(50 BYTE)
+ , TOKEN VARCHAR2(100 BYTE)
+ , INDPRODUCAO NUMBER(1,0)
+ , ACTIVO NUMBER(1,0)
+ , FECMODIF DATE
+ , USUARIO_ID NUMBER(7,0)
+ , CONSTRAINT EMPRESA_EREDE_CONFIG PRIMARY KEY ( EMPRESAEREDE_ID ) ENABLE ) ';
+
+ exception when object_exists then null;
+end;
+/
+declare
+ object_exists exception;
+ pragma exception_init (object_exists , -00955);
+begin
+ execute immediate
+ 'CREATE SEQUENCE EMP_EREDE_CONFIG_SEQ';
+ exception when object_exists then null;
+end;
diff --git a/src/db/postgresql/migration/V20221128_1235__AL1786.sql b/src/db/postgresql/migration/V20221128_1235__AL1786.sql
new file mode 100644
index 000000000..39421f455
--- /dev/null
+++ b/src/db/postgresql/migration/V20221128_1235__AL1786.sql
@@ -0,0 +1,30 @@
+declare
+ object_exists exception;
+ pragma exception_init (object_exists , -00955);
+begin
+ execute immediate
+ 'CREATE TABLE EMPRESA_CIELOLINK_CONFIG
+ (
+ EMPRESACIELOLINK_ID NUMBER(7, 0) NOT NULL
+ , EMPRESA_ID NUMBER(7, 0)
+ , CLIENT_ID VARCHAR2(50 BYTE)
+ , MERCHANT_ID VARCHAR2(50 BYTE)
+ , SECRET VARCHAR2(50 BYTE)
+ , MINUTOS_CANCELA NUMBER(7,0)
+ , URL VARCHAR2(50 BYTE)
+ , ACTIVO NUMBER(1,0)
+ , FECMODIF DATE
+ , USUARIO_ID NUMBER(7,0)
+ , CONSTRAINT EMPRESA_CIELOLINK_CONFIG PRIMARY KEY ( EMPRESACIELOLINK_ID ) ENABLE ) ';
+
+ exception when object_exists then null;
+end;
+/
+declare
+ object_exists exception;
+ pragma exception_init (object_exists , -00955);
+begin
+ execute immediate
+ 'CREATE SEQUENCE EMP_CIELOLINK_CONFIG_SEQ';
+ exception when object_exists then null;
+end;
diff --git a/src/db/postgresql/migration/V20221207_1034__AL-1860.sql b/src/db/postgresql/migration/V20221207_1034__AL-1860.sql
new file mode 100644
index 000000000..83ef67012
--- /dev/null
+++ b/src/db/postgresql/migration/V20221207_1034__AL-1860.sql
@@ -0,0 +1,13 @@
+-- INSERT / UPDATE
+declare
+ dup_val_on_index exception;
+ except_02291 exception;
+
+ pragma exception_init (dup_val_on_index , -00001);
+ pragma exception_init (except_02291 , -02291);
+begin
+ execute immediate 'Insert into AUTORIZACION (AUTORIZACION_ID,NOMBAUTORIZACION,DESCAUTORIZACION,ACTIVO,FECMODIF,USUARIO_ID) values (AUTORIZACION_SEQ.NEXTVAL,''AUT_MAPA_LGPD'',''AUTORIZACAO PARA EXIBIR DADOS LGPD NO MAPA DE VIAGEM'',1,SYSDATE,1)';
+ exception
+ when dup_val_on_index then null;
+ when except_02291 then null;
+end;
\ No newline at end of file
diff --git a/src/db/postgresql/migration/V20221221_1650__AL-1786.sql b/src/db/postgresql/migration/V20221221_1650__AL-1786.sql
new file mode 100644
index 000000000..98ef59e1f
--- /dev/null
+++ b/src/db/postgresql/migration/V20221221_1650__AL-1786.sql
@@ -0,0 +1,28 @@
+-- INSERT / UPDATE
+declare
+ dup_val_on_index exception;
+ except_02291 exception;
+
+ pragma exception_init (dup_val_on_index , -00001);
+ pragma exception_init (except_02291 , -02291);
+begin
+ execute immediate 'Insert into empresa_cielolink_config
+ (empresacielolink_id, empresa_id, merchant_id, minutos_cancela, client_id, url, secret, usuario_id, fecmodif, activo)
+ select
+ EMP_CIELOLINK_CONFIG_SEQ.nextval, empresa_id, merchant_id , minutos , client_id , url , secret , usuario_id , fecmodif, activo from
+ (
+ select
+ empresa_id,
+ (SELECT valorconstante FROM constante where nombconstante like ''MERCHANT_ID_CIELO_LINK'') as merchant_id,
+ (SELECT valorconstante FROM constante where nombconstante like ''MINUTOS_EXPIRACAO_CIELO_LINK'') as minutos,
+ (SELECT valorconstante FROM constante where nombconstante like ''CLIENT_ID_CIELO_LINK'') as client_id,
+ (SELECT valorconstante FROM constante where nombconstante like ''URL_CIELO_LINK'') as url,
+ (SELECT valorconstante FROM constante where nombconstante like ''SECRET_CIELO_LINK'') as secret,
+ 1 as usuario_id,
+ sysdate as fecmodif,
+ 1 as activo
+ from empresa where activo = 1 order by empresa_id) dados';
+ exception
+ when dup_val_on_index then null;
+ when except_02291 then null;
+end;
\ No newline at end of file