Skip to content

Commit

Permalink
Chk 1779 db configuration (#7)
Browse files Browse the repository at this point in the history
* chore(build): integrate ecommerce commons library

* chore(build): make commons build skipped by default for local build

* feat(oracle): add configuration for reactive oracle connection

* feat(mongo): add ecommerce cosmos db configuration

* fix: restore readme

* fix: restore gradle build

* fix: restore gradle build

* fix: restore settings.gradle

* feat(oracle): added oracle configuration

* fix: add contaner name

* fix: add mongo and mongo express

* fix: restore network

---------

Co-authored-by: Fernando-Granato <[email protected]>
  • Loading branch information
pietro-tota and Fernando-Granato authored Aug 8, 2023
1 parent 3e58a87 commit d65e1a7
Show file tree
Hide file tree
Showing 137 changed files with 24,771 additions and 3 deletions.
43 changes: 41 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '3.8'

services:
pagopa-ecommerce-helpdesk:
container_name: pagopa-ecommerce-helpdesk
pagopa-ecommerce-helpdesk-service:
container_name: pagopa-ecommerce-helpdesk-service
build:
dockerfile: Dockerfile
context: .
Expand All @@ -12,6 +12,45 @@ services:
- "8080:8080"
networks:
- pagopa-ecommerce-net
oracle:
container_name: pagopa-ecommerce-helpdesk-oracle
build: ./docker/oracleDB/liquibase
profiles:
- arm64
image: pagopadcommonacr.azurecr.io/dboracle-ee-12.2.0.1-slim
ports:
- 1521:1521
- 5500:5500
expose:
- '1521'
- '5500'
extra_hosts:
- "spid-testenv2:127.0.0.1"
- "spid-testenv2-2:127.0.0.1"
- "pagopa-dev:127.0.0.1"
- "spid-validator:127.0.0.1"
mongo:
container_name: pagopa-ecommerce-helpdesk-mongo
image: mongo
env_file: docker/mongoDB/mongodb.env
ports:
- "27017:27017"
networks:
- pagopa-ecommerce-net
healthcheck:
test: echo "db.stats().ok" | mongo --quiet
interval: 10s

mongo-express:
container_name: pagopa-ecommerce-helpdesk-express
image: mongo-express
env_file: docker/mongoDB/mongo-express.env
ports:
- "8081:8081"
networks:
- pagopa-ecommerce-net
depends_on:
- mongo

networks:
pagopa-ecommerce-net:
Expand Down
3 changes: 3 additions & 0 deletions docker/mongoDB/mongo-express.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=password
ME_CONFIG_MONGODB_URL=mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@pagopa-ecommerce-mongo:27017/
2 changes: 2 additions & 0 deletions docker/mongoDB/mongodb.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=password
39 changes: 39 additions & 0 deletions docker/oracleDB/liquibase/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM pagopadcommonacr.azurecr.io/dboracle-ee-12.2.0.1-slim

USER root

RUN cd /home/oracle/ \
&& curl -LO https://github.com/liquibase/liquibase/releases/download/v4.8.0/liquibase-4.8.0.tar.gz \
&& mkdir -p liquibase \
&& tar xf liquibase-4.8.0.tar.gz -C liquibase \
&& chown -R oracle:0 /home/oracle/liquibase/ \
&& chmod -R a+rwx /home/oracle/liquibase/ \
&& ln -sf /home/oracle/liquibase /usr/local/bin \
&& yum -y install dos2unix \
&& yum -y install java-1.8.0-openjdk \
&& yum -y install which

USER oracle

ADD lib/com.oracle.ojdbc8-12.2.0.1.jar /home/oracle/liquibase/
ADD wait_for_it.sh /home/oracle/
ADD wait_and_migrate.sh /home/oracle/
ADD run_image.sh /home/oracle/
ADD changelogs/ /home/oracle/changelogs

USER root

RUN cd /home/oracle/ \
&& chown -R oracle:0 wait_for_it.sh \
&& chmod -R a+rwx wait_for_it.sh \
&& chown -R oracle:0 wait_and_migrate.sh \
&& chmod -R a+rwx wait_and_migrate.sh \
&& chown -R oracle:0 run_image.sh \
&& chmod -R a+rwx run_image.sh \
&& dos2unix wait_for_it.sh \
&& dos2unix wait_and_migrate.sh \
&& dos2unix run_image.sh

USER oracle

CMD /home/oracle/wait_and_migrate.sh ; exec /home/oracle/setup/dockerInit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.8.xsd">
<changeSet id="event-registry-remote-history-data-insert" author="liquibase" failOnError="true" context="insert">
<sqlFile path="./scripts/data-insert/V1__BASELINE.sql" stripComments="true" relativeToChangelogFile="true" dbms="oracle" encoding="UTF-8" />
</changeSet>
<changeSet id="V2__SEQUENCE_RESET" author="liquibase" failOnError="true" context="insert">
<sqlFile path="./scripts/data-insert/V2__SEQUENCE_RESET.sql" endDelimiter="/" splitStatements="false" stripComments="true" relativeToChangelogFile="true" dbms="oracle" encoding="UTF-8" />
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.8.xsd">
<changeSet id="V3__DROP_PK_RE_WISP" author="liquibase" failOnError="true" context="incremental">
<sqlFile path="../scripts/table-creation/V3__DROP_PK_RE_WISP.sql" stripComments="true" relativeToChangelogFile="true" dbms="oracle" encoding="UTF-8" />
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.8.xsd">
<include file="./tag-changelog.xml" relativeToChangelogFile="true"/>
<include file="./table-creation-changelog.xml" relativeToChangelogFile="true"></include>
<include file="./data-insert-changelog.xml" relativeToChangelogFile="true"></include>
<include file="./table-partition-changelog.xml" relativeToChangelogFile="true"></include>
<include file="./incremental-changelogs/V1_PM_1084-changelog.xml" relativeToChangelogFile="true"></include>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('60','TRNCARTINIT','TRANSACTION_CART_INIT');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('61','TRNMOD1INIT','TRANSACTION_MOD1_INIT');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('62','TRNMOD2INIT','TRANSACTION_MOD2_INIT');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('63','PAYMNTSUCCESS_CARD','PAYMENT_SUCCESS_CARD');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('64','PAYMNTSUCCESS_MOD1','PAYMENT_SUCCESS_MOD1');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('65','PAYMNTSUCCESS_MOD2','PAYMENT_SUCCESS_MOD2');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('66','CANCELPAYMTUSER','USER_CANCELED_PAYMENT');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('67','CANCELPAYMTEXPRD','USER_SESSION_EXPIRED');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('1','VRFYOTP','VERIFY_OTP');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('2','OTPSIGNIN','OTP_SIGNIN');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('3','OTPSIGNINPUK','OTP_SIGNIN_PUK');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('4','OTPLOGIN','OTP_LOGIN');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('5','OTPVRFEMAIL','OTP_VERIFY_EMAIL');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('6','OTPSTPWD','OTP_RESET_PASSWORD');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('7','OTPMDFPHONENO','OTP_MODIFY_PHONE_NUMBER');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('8','OTPMDFEMAIL','OTP_MODIFY_EMAIL');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('9','OTPREGPAYMNT','OTP_REGISTERED_PAYMENT');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('10','PAYMNTSUCCESS','OTP_PAYMENT_SUCCESS');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('11','PAYMNTSTORNO','OTP_PAYMENT_STORNO');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('12','PAY','PAY');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('13','PAYCCVER','PAY_CREDIT_CARD_VERIFICATION');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('14','DELPAYMT','DELETE_PAYMENT');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('15','CANCELPAYMT','CANCELED_PAYMENT');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('16','PSPLIST','GET_PSP_LIST');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('17','GETPSP','GET_PSP');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('18','GETTRNSS','GET_TRANSACTIONS');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('19','GETTRAN','GET_TRANSACTION');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('20','CHCKSTAT','CHECK_STATUS');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('21','RESUME','RESUME');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('22','AUTHENTICATION_EMAIL','AUTHENTICATION_EMAIL');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('23','AUTHENTICATION_SPID','AUTHENTICATION_SPID');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('24','UPDTUSR','UPDATE_USER');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('25','DELUSER','LOGIC_DELETE_PENDING_USER');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('26','EMAILVAL','EMAIL_VALIDATION');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('27','RSTPWD','RESET_PASSWORD_VALIDATION');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('28','VRUPDPWD','VERIFY_AND_UPDATE_PASSWORD_VALIDATION');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('29','VUPPUK','VERIFY_AND_UPDATE_PUK_VALIDATION');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('30','GNRSTPWD','GENERATE_RESET_PASSWORD');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('31','APRVTRMS','APPROVE_TERMS');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('32','SIGNIN','SIGN_IN');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('33','SIGNINPHONE','SIGN_IN_PHONE_STEP');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('34','SETPWD','SIGN_IN_SET_PASSWORD');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('35','UPDPWD','UPDATE_PASSWORD');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('36','CHNGMAIL','CHANGE_EMAIL');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('37','CNGPHONE','CHANGE_PHONE');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('38','VRUSRPUK','VERIFY_USER_PUK');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('39','VRUSRPWD','VERIFY_USER_PASSWORD');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('40','LOGOUT','LOGOUT');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('41','DELCC','DELETE_CREDIT_CARD');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('42','GETWLLTS','GET_WALLETS');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('43','ADDWLLT','ADD_WALLET');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('44','ADDWLTCC','ADD_WALLET_CREDIT_CARD');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('45','GETWLT','GET_WALLET');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('46','DELWLLT','DELETE_WALLET');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('47','FAVWLLT','FAVOURITE_WALLET');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('48','CNFRMWLT','CONFIRM_WALLET');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('49','UPDWLLT','UPDATE_WALLET');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('50','CHCKBIN','CHECK_CARD_BIN');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('51','AUTHORIZE','AUTHORIZE');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('52','RDRCTPSP','REDIRECT_TO_PSP');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('53','RESUMETRAN','RESUME_TRANSACTION');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('54','TRNCRTD','TRANSACTION_CREATED');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('55','TRNACCNTD','TRANSACTION_ACCOUNTED');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('56','TRNRVRTD','TRANSACTION_REVERTED');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('57','TRNACCMOD2','TRANSACTION_ACCEPTED_MOD2');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('58','TRNRFSMOD2','TRANSACTION_REFUSED_MOD2');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('59','TRNRFS','TRANSACTION_REFUSED');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('68','TRNACCNTD_REQ','TRANSACTION_ACCOUNT_REQUESTED');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('69','TRNACCNTD_RESP_KO','TRANSACTION_NOT_ACCOUNTED');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('70','TRNACCNTD_RESP_OK','TRANSACTION_ACCOUNTED_OK');
Insert into EVENTO_WISP (ID,SHORT_NAME,DESCRIPTION) values ('71','AUTHPAYMT','AUTHORIZED_PAYMENT');
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DECLARE
MAX_ID NUMBER;
BEGIN

SELECT COALESCE(MAX(ID),0) + 1 INTO MAX_ID FROM RE_WISP;
EXECUTE IMMEDIATE 'ALTER SEQUENCE SEQ_WISP RESTART START WITH ' || MAX_ID;
SELECT COALESCE(MAX(ID),0) + 1 INTO MAX_ID FROM EVENTO_WISP;
EXECUTE IMMEDIATE 'ALTER SEQUENCE SEQ_EVENTO RESTART START WITH ' || MAX_ID;

END;
/
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--SET DEFINE OFF;
alter session set "_ORACLE_SCRIPT"=true;

CREATE USER EVENT_REGISTRY_REMOTE_HISTORY IDENTIFIED BY pwd_event_registry;

GRANT CONNECT, RESOURCE TO EVENT_REGISTRY_REMOTE_HISTORY;
GRANT UNLIMITED TABLESPACE TO EVENT_REGISTRY_REMOTE_HISTORY;

GRANT CREATE ANY TABLE to PPTEST;
GRANT CREATE ANY SEQUENCE to PPTEST;
GRANT CREATE ANY INDEX to PPTEST;

SELECT 'GRANT ALL ON '||table_name||' TO PPTEST' FROM ALL_TABLES WHERE OWNER = 'EVENT_REGISTRY_REMOTE_HISTORY';

GRANT ALL PRIVILEGES to PPTEST;
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
CREATE SEQUENCE SEQ_EVENTO
START WITH 1
INCREMENT BY 1
NOCACHE;

CREATE SEQUENCE SEQ_WISP
START WITH 1
INCREMENT BY 1
NOCACHE;

CREATE TABLE EVENTO_WISP (
ID NUMBER,
SHORT_NAME VARCHAR2(50) NOT NULL,
DESCRIPTION VARCHAR2(100) NULL,
CONSTRAINT EVENTO_WISP_PK PRIMARY KEY (ID),
CONSTRAINT event_unique_short_name UNIQUE (SHORT_NAME)
);

CREATE TABLE RE_WISP (
ID NUMBER,
PP_PAYMENT_ID NUMBER NOT NULL,
PP_USER_ID NUMBER NULL,
PP_WALLET_ID NUMBER NULL,
EVENTO_WISP_ID NUMBER NOT NULL,
PP_SESSION_TOKEN VARCHAR2(128 BYTE),
EVENT_TIME TIMESTAMP NOT NULL,
DETAILS CLOB,
ID_PAYMENT VARCHAR2(128 BYTE),
CONSTRAINT RE_WISP_PK PRIMARY KEY (ID),
CONSTRAINT FK_UEVENT_EVENT FOREIGN KEY (EVENTO_WISP_ID) REFERENCES EVENTO_WISP(ID)
);

CREATE INDEX RE_WISP_REMOTE_PP_PAYMENT_ID_IDX ON RE_WISP (PP_PAYMENT_ID);
CREATE INDEX RE_WISP_REMOTE_PP_USER_ID_IDX ON RE_WISP (PP_USER_ID);
CREATE INDEX RE_WISP_REMOTE_ID_PAYMENT_IDX ON RE_WISP (id_payment);
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
DROP INDEX RE_WISP_REMOTE_PP_PAYMENT_ID_IDX;
DROP INDEX RE_WISP_REMOTE_PP_USER_ID_IDX;
DROP INDEX RE_WISP_REMOTE_ID_PAYMENT_IDX;

ALTER TABLE RE_WISP DROP CONSTRAINT RE_WISP_PK DROP INDEX;
ALTER TABLE RE_WISP DROP CONSTRAINT FK_UEVENT_EVENT DROP INDEX;

ALTER TABLE RE_WISP RENAME TO RE_WISP_OLD;

CREATE TABLE RE_WISP (
ID NUMBER,
PP_PAYMENT_ID NUMBER NOT NULL,
PP_USER_ID NUMBER NULL,
PP_WALLET_ID NUMBER NULL,
EVENTO_WISP_ID NUMBER NOT NULL,
PP_SESSION_TOKEN VARCHAR2(128 BYTE),
EVENT_TIME TIMESTAMP NOT NULL,
DETAILS CLOB,
ID_PAYMENT VARCHAR2(128 BYTE),
CONSTRAINT RE_WISP_PK PRIMARY KEY (ID),
CONSTRAINT FK_UEVENT_EVENT FOREIGN KEY (EVENTO_WISP_ID) REFERENCES EVENTO_WISP(ID)
)
PARTITION BY RANGE (EVENT_TIME)
INTERVAL (NUMTODSINTERVAL(1, 'day'))
(
PARTITION "RE_WISP_1" VALUES LESS THAN (TIMESTAMP' 2019-04-01 00:00:00')
);

CREATE INDEX RE_WISP_REMOTE_PP_PAYMENT_ID_IDX ON RE_WISP (PP_PAYMENT_ID);
CREATE INDEX RE_WISP_REMOTE_PP_USER_ID_IDX ON RE_WISP (PP_USER_ID);
CREATE INDEX RE_WISP_REMOTE_ID_PAYMENT_IDX ON RE_WISP (id_payment);

INSERT INTO RE_WISP (
ID,
PP_PAYMENT_ID,
PP_USER_ID,
PP_WALLET_ID,
EVENTO_WISP_ID,
PP_SESSION_TOKEN,
EVENT_TIME,
DETAILS,
ID_PAYMENT
)
SELECT
ID,
PP_PAYMENT_ID,
PP_USER_ID,
PP_WALLET_ID,
EVENTO_WISP_ID,
PP_SESSION_TOKEN,
EVENT_TIME,
DETAILS,
ID_PAYMENT
FROM
RE_WISP_OLD;

DROP TABLE RE_WISP_OLD;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE RE_WISP DROP CONSTRAINT RE_WISP_PK DROP INDEX;
CREATE INDEX RE_WISP_ID_IDX ON RE_WISP (ID);
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.8.xsd">
<changeSet id="event-registry-remote-table-creation" author="liquibase" failOnError="true" context="baseline">
<sqlFile path="./scripts/table-creation/V1__BASELINE.sql" stripComments="true" relativeToChangelogFile="true" dbms="oracle" encoding="UTF-8" />
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.8.xsd">
<changeSet id="event-registry-remote-table-partition" author="liquibase" failOnError="true" context="baseline and !insert-dev">
<sqlFile path="./scripts/table-creation/V2__ALTER_RE_WISP_ADD_PARTITION.sql" stripComments="true" relativeToChangelogFile="true" dbms="oracle" encoding="UTF-8" />
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.8.xsd">
<changeSet id="lb-tag-${version}" author="liquibase" runAlways="true" runOrder="last" context="tag">
<tagDatabase tag="${version}" />
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.8.xsd">
<changeSet id="event-registry-remote-data-insert" author="liquibase" failOnError="true" context="insert">
<sqlFile path="./scripts/data-insert/V1__BASELINE.sql" stripComments="true" relativeToChangelogFile="true" dbms="oracle" encoding="UTF-8" />
</changeSet>
<changeSet id="V2__SEQUENCE_RESET" author="liquibase" failOnError="true" context="insert">
<sqlFile path="./scripts/data-insert/V2__SEQUENCE_RESET.sql" endDelimiter="/" splitStatements="false" stripComments="true" relativeToChangelogFile="true" dbms="oracle" encoding="UTF-8" />
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.8.xsd">
<include file="./tag-changelog.xml" relativeToChangelogFile="true"/>
<include file="./table-creation-changelog.xml" relativeToChangelogFile="true"></include>
<include file="./data-insert-changelog.xml" relativeToChangelogFile="true"></include>
<include file="./table-partition-changelog.xml" relativeToChangelogFile="true"></include>
</databaseChangeLog>
Loading

0 comments on commit d65e1a7

Please sign in to comment.