-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* rename migrator integration test package * fix migrator dependency * extra ci job for migrator it * move configuration to it module * Increase waiting time. * fix issue migrator, clean code * remove header and remove code change * skip SQLServer * skip Run Migrator in old DAO * fix oracle schema override * remove deprecated soft delete SQL * fix ci condition * fix oracle clean up * fix sqlserver insert
- Loading branch information
Showing
39 changed files
with
210 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
125 changes: 125 additions & 0 deletions
125
migrator-integration-test/src/test/resources/oracle-schema-overrides.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Oracle does not support returning a column with a case senstive name so all the column names and table names need | ||
# to be caps. See: | ||
# https://github.com/slick/slick/issues/47 | ||
# https://groups.google.com/g/scalaquery/c/U431n-Z2cwM | ||
|
||
jdbc-snapshot-store { | ||
tables { | ||
|
||
legacy_snapshot { | ||
tableName = "LEGACY_SNAPSHOT" | ||
schemaName = "SYSTEM" | ||
columnNames { | ||
persistenceId = "PERSISTENCE_ID" | ||
sequenceNumber = "SEQUENCE_NUMBER" | ||
created = "CREATED" | ||
snapshot = "SNAPSHOT" | ||
} | ||
} | ||
|
||
|
||
snapshot { | ||
tableName = "SNAPSHOT" | ||
schemaName = "SYSTEM" | ||
columnNames { | ||
persistenceId = "PERSISTENCE_ID" | ||
sequenceNumber = "SEQUENCE_NUMBER" | ||
created = "CREATED" | ||
|
||
snapshotPayload = "SNAPSHOT_PAYLOAD" | ||
snapshotSerId = "SNAPSHOT_SER_ID" | ||
snapshotSerManifest = "SNAPSHOT_SER_MANIFEST" | ||
|
||
metaPayload = "META_PAYLOAD" | ||
metaSerId = "META_SER_ID" | ||
metaSerManifest = "META_SER_MANIFEST" | ||
} | ||
} | ||
} | ||
} | ||
|
||
jdbc-read-journal { | ||
tables { | ||
event_journal { | ||
tableName = "EVENT_JOURNAL" | ||
schemaName = "SYSTEM" | ||
} | ||
legacy_journal { | ||
tableName = "JOURNAL" | ||
schemaName = "SYSTEM" | ||
} | ||
} | ||
} | ||
|
||
jdbc-journal { | ||
tables { | ||
legacy_journal { | ||
tableName = "JOURNAL" | ||
schemaName = "SYSTEM" | ||
|
||
columnNames { | ||
ordering = "ORDERING" | ||
deleted = "DELETED" | ||
persistenceId = "PERSISTENCE_ID" | ||
sequenceNumber = "SEQUENCE_NUMBER" | ||
created = "CREATED" | ||
tags = "TAGS" | ||
message = "MESSAGE" | ||
} | ||
} | ||
|
||
event_journal { | ||
tableName = "EVENT_JOURNAL" | ||
schemaName = "SYSTEM" | ||
|
||
columnNames { | ||
ordering = "ORDERING" | ||
deleted = "DELETED" | ||
persistenceId = "PERSISTENCE_ID" | ||
sequenceNumber = "SEQUENCE_NUMBER" | ||
writer = "WRITER", | ||
writeTimestamp = "WRITE_TIMESTAMP" | ||
adapterManifest = "ADAPTER_MANIFEST" | ||
eventPayload = "EVENT_PAYLOAD" | ||
eventSerId = "EVENT_SER_ID" | ||
eventSerManifest = "EVENT_SER_MANIFEST" | ||
metaPayload = "META_PAYLOAD" | ||
metaSerId = "META_SER_ID" | ||
metaSerManifest = "META_SER_MANIFEST" | ||
} | ||
} | ||
|
||
event_tag { | ||
tableName = "EVENT_TAG" | ||
schemaName = "SYSTEM" | ||
|
||
columnNames { | ||
eventId = "EVENT_ID" | ||
tag = "TAG" | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
||
jdbc-durable-state-store { | ||
tables { | ||
durable_state { | ||
tableName = "DURABLE_STATE" | ||
schemaName = "SYSTEM" | ||
|
||
columnNames { | ||
globalOffset = "GLOBAL_OFFSET" | ||
persistenceId = "PERSISTENCE_ID" | ||
revision = "REVISION" | ||
statePayload = "STATE_PAYLOAD" | ||
stateSerId = "STATE_SERIAL_ID" | ||
stateSerManifest = "STATE_SERIAL_MANIFEST" | ||
tag = "TAG" | ||
stateTimestamp = "STATE_TIMESTAMP" | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
41 changes: 41 additions & 0 deletions
41
migrator-integration-test/src/test/resources/schema/oracle/oracle-create-schema-legacy.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
CREATE SEQUENCE ORDERING__SEQ START WITH 1 INCREMENT BY 1 NOMAXVALUE | ||
/ | ||
|
||
CREATE TABLE JOURNAL ( | ||
ORDERING NUMERIC UNIQUE, | ||
DELETED CHAR(1) DEFAULT 0 NOT NULL check (DELETED in (0, 1)), | ||
PERSISTENCE_ID VARCHAR(255) NOT NULL, | ||
SEQUENCE_NUMBER NUMERIC NOT NULL, | ||
TAGS VARCHAR(255) DEFAULT NULL, | ||
MESSAGE BLOB NOT NULL, | ||
PRIMARY KEY(PERSISTENCE_ID, SEQUENCE_NUMBER) | ||
) | ||
/ | ||
|
||
CREATE TABLE LEGACY_SNAPSHOT ( | ||
PERSISTENCE_ID VARCHAR(255) NOT NULL, | ||
SEQUENCE_NUMBER NUMERIC NOT NULL, | ||
CREATED NUMERIC NOT NULL, | ||
SNAPSHOT BLOB NOT NULL, | ||
PRIMARY KEY(PERSISTENCE_ID,SEQUENCE_NUMBER) | ||
) | ||
/ | ||
|
||
CREATE OR REPLACE TRIGGER JOURNAL__ORDERING_TRG | ||
BEFORE INSERT ON JOURNAL | ||
FOR EACH ROW | ||
BEGIN | ||
SELECT ORDERING__SEQ.NEXTVAL INTO :NEW.ORDERING FROM DUAL; | ||
END; | ||
/ | ||
|
||
CREATE OR REPLACE PROCEDURE "reset_legacy_sequence" | ||
IS | ||
l_value NUMBER; | ||
BEGIN | ||
EXECUTE IMMEDIATE 'SELECT ORDERING__SEQ.nextval FROM dual' INTO l_value; | ||
EXECUTE IMMEDIATE 'ALTER SEQUENCE ORDERING__SEQ INCREMENT BY -' || l_value || ' MINVALUE 0'; | ||
EXECUTE IMMEDIATE 'SELECT ORDERING__SEQ.nextval FROM dual' INTO l_value; | ||
EXECUTE IMMEDIATE 'ALTER SEQUENCE ORDERING__SEQ INCREMENT BY 1 MINVALUE 0'; | ||
END; | ||
/ |
18 changes: 18 additions & 0 deletions
18
migrator-integration-test/src/test/resources/schema/oracle/oracle-drop-schema-legacy.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- (ddl lock timeout in seconds) this allows tests which are still writing to the db to finish gracefully | ||
ALTER SESSION SET ddl_lock_timeout = 150 | ||
/ | ||
|
||
DROP TRIGGER JOURNAL__ORDERING_TRG | ||
/ | ||
|
||
DROP PROCEDURE "reset_legacy_sequence" | ||
/ | ||
|
||
DROP SEQUENCE ORDERING__SEQ | ||
/ | ||
|
||
DROP TABLE JOURNAL CASCADE CONSTRAINT | ||
/ | ||
|
||
DROP TABLE LEGACY_SNAPSHOT CASCADE CONSTRAINT | ||
/ |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
migrator/src/test/resources/schema/h2/h2-create-schema.sql
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.