changelog.db.changelog-master.xml Maven / Gradle / Ivy
The newest version!
Alter SCENARIO VERSION column
ALTER TABLE SCENARIO ALTER COLUMN VERSION DROP DEFAULT
ALTER TABLE SCENARIO ALTER COLUMN VERSION SET NOT NULL
Rename CAMPAIGN_SCENARIOS columns
Rename CAMPAIGN_EXECUTION_HISTORY columns
Rename CAMPAIGN_EXECUTION_HISTORY columns
Rename CAMPAIGN_EXECUTION_HISTORY columns
Rename CAMPAIGN_EXECUTION_HISTORY columns
8:6c57f5fa420d9a562007768c65274aa3
Drop SCENARIO_EXECUTION_HISTORY id sequence
Alias text postgresql type as clob
create domain clob as text
Create SCENARIO table
8:cedc00e540a2be8d95813f0b8269098e
Init sequence in session
select nextval('SCENARIO_SEQ')
select currval('SCENARIO_SEQ') - (select max(cast(ID as integer)) from SCENARIO)
Update SCENARIO id sequence
alter sequence SCENARIO_SEQ restart with (select max(cast(ID as integer))+1 from SCENARIO)
select (select last_value from SCENARIO_SEQ) - (select max(cast(ID as integer)) from SCENARIO)
Update SCENARIO id sequence
select setval('SCENARIO_SEQ', max(cast(ID as integer))+1) from SCENARIO
Create CAMPAIGN table
8:b2d47bad6bb04a1521a1c36f1f69ef31
Init sequence in session
select nextval('CAMPAIGN_SEQ')
select currval('CAMPAIGN_SEQ') - (select max(ID) from CAMPAIGN)
Update CAMPAIGN id sequence
alter sequence CAMPAIGN_SEQ restart with (select max(ID)+1 from CAMPAIGN)
select (select last_value from CAMPAIGN_SEQ) - (select max(ID) from CAMPAIGN)
Update CAMPAIGN id sequence
select setval('CAMPAIGN_SEQ', max(ID)+1) from CAMPAIGN
Create SCENARIO_EXECUTION_HISTORY table
8:1236e6d6f029325bc6aed052f04e158e
Init sequence in session
select nextval('SCENARIO_EXECUTION_HISTORY_SEQ')
select currval('SCENARIO_EXECUTION_HISTORY_SEQ') - (select max(ID) from SCENARIO_EXECUTION_HISTORY)
Update SCENARIO_EXECUTION_HISTORY id sequence
alter sequence SCENARIO_EXECUTION_HISTORY_SEQ restart with (select max(ID)+1 from SCENARIO_EXECUTION_HISTORY)
select (select last_value from SCENARIO_EXECUTION_HISTORY_SEQ) - (select max(ID) from SCENARIO_EXECUTION_HISTORY)
Update SCENARIO_EXECUTION_HISTORY id sequence
select setval('SCENARIO_EXECUTION_HISTORY_SEQ', max(ID)+1) from SCENARIO_EXECUTION_HISTORY
Create CAMPAIGN_SCENARIOS table
8:90bed7790f3a234999e657bc194b2632
Create CAMPAIGN_EXECUTION_HISTORY table
8:b7b1dbdf1c198f4edf3cd444e2d5b1b4
Init sequence in session
select nextval('CAMPAIGN_EXECUTION_SEQ')
select currval('CAMPAIGN_EXECUTION_SEQ') - (select max(ID) from CAMPAIGN_EXECUTION_HISTORY)
Update CAMPAIGN_EXECUTION_HISTORY id sequence
alter sequence CAMPAIGN_EXECUTION_SEQ restart with (select max(ID)+1 from CAMPAIGN_EXECUTION_HISTORY)
select (select last_value from CAMPAIGN_EXECUTION_SEQ) - (select max(ID) from CAMPAIGN_EXECUTION_HISTORY)
Update CAMPAIGN_EXECUTION_HISTORY id sequence
select setval('CAMPAIGN_EXECUTION_SEQ', max(ID)+1) from CAMPAIGN_EXECUTION_HISTORY
Create column index in CAMPAIGN_SCENARIOS
Create CAMPAIGN_PARAMETER table
Create column ENVIRONMENT in CAMPAIGN
Create column PARTIAL_EXECUTION in CAMPAIGN_EXECUTION_HISTORY
Create column EXECUTION_ENVIRONMENT in CAMPAIGN_EXECUTION_HISTORY
Create column PARALLEL_RUN in CAMPAIGN
Create column RETRY_AUTO in CAMPAIGN
Create column ENVIRONMENT in SCENARIO_EXECUTION_HISTORY
Create column USER_ID in CAMPAIGN_EXECUTION_HISTORY
Create column USER_ID in SCENARIO_EXECUTION_HISTORY
Create column DATASET_ID in CAMPAIGN
Create columns DATASET_ID and DATASET_VERSION in SCENARIO_EXECUTION_HISTORY
Create columns DATASET_ID and DATASET_VERSION in CAMPAIGN_EXECUTION_HISTORY
Rename column VERSION to CONTENT_VERSION
Create columns USER_ID, UPDATE_DATE and VERSION in SCENARIO
Set CREATION_DATE to CURRENT_TIMESTAMP if null and Init column UPDATE_DATE in SCENARIO from
CREATION_DATE
UPDATE SCENARIO SET CREATION_DATE = CURRENT_TIMESTAMP WHERE CREATION_DATE IS NULL
UPDATE SCENARIO SET UPDATE_DATE = CREATION_DATE
Add not nullable constraint to column UPDATE_DATE
Create column TAGS in CAMPAIGN
Remove SCHEDULE_TIME column
Rename VALUE column
Migrate Scenario table
INSERT INTO SCENARIO ( ID, TITLE, DESCRIPTION, CONTENT, TAGS, CREATION_DATE, DATASET, ACTIVATED, CONTENT_VERSION, USER_ID, UPDATE_DATE, VERSION )
SELECT CAST(ID AS INTEGER), TITLE, DESCRIPTION, CONTENT, TAGS, EXTRACT(EPOCH FROM CREATION_DATE) * 1000, DATASET, ACTIVATED, CONTENT_VERSION, USER_ID, EXTRACT(EPOCH FROM UPDATE_DATE) * 1000, VERSION
FROM SCENARIO_OLD
ALTER TABLE SCENARIO ALTER COLUMN ID RESTART WITH (SELECT MAX(ID) + 1 FROM SCENARIO)
SELECT SETVAL('scenario_id_seq', (SELECT MAX(id) FROM SCENARIO))
Create columns DEFAULT_DATASET_ID in SCENARIO
Create Scenario table
Drop old Scenario table sequence
Drop old Scenario table
Drop Scenario CONTENT_VERSION column
Create Scenario ID unique index
Drop campaign foreign keys (sqlite convergence)
Drop campaign foreign keys specifics (sqlite convergence)
Migrate table CAMPAIGN (sqlite convergence)
INSERT INTO CAMPAIGN ( ID, TITLE, DESCRIPTION, ENVIRONMENT, PARALLEL_RUN, RETRY_AUTO, DATASET_ID, TAGS )
SELECT ID, TITLE, DESCRIPTION, ENVIRONMENT, PARALLEL_RUN, RETRY_AUTO, DATASET_ID, TAGS
FROM CAMPAIGN_OLD
ALTER TABLE CAMPAIGN ALTER COLUMN ID RESTART WITH (SELECT MAX(ID)+1 FROM CAMPAIGN)
SELECT SETVAL('campaign_id_seq', (SELECT MAX(ID) FROM CAMPAIGN))
Drop old Campaign table sequence
Drop old Campaign table
Migrate table CAMPAIGN_SCENARIOS (sqlite convergence)
INSERT INTO CAMPAIGN_SCENARIOS ( CAMPAIGN_ID, SCENARIO_ID, RANK )
SELECT CAMPAIGN_ID, SCENARIO_ID, INDEX
FROM CAMPAIGN_SCENARIOS_OLD
Drop old Campaign scenarios table
Migrate table CAMPAIGN_PARAMETER (sqlite convergence)
INSERT INTO CAMPAIGN_PARAMETERS ( ID, CAMPAIGN_ID, PARAMETER, PARAMETER_VALUE )
SELECT ID, CAMPAIGN_ID, PARAMETER, PARAMETER_VALUE
FROM CAMPAIGN_PARAMETER_OLD
ALTER TABLE CAMPAIGN_PARAMETERS ALTER COLUMN ID RESTART WITH (SELECT MAX(ID)+1 FROM CAMPAIGN_PARAMETERS)
SELECT SETVAL('campaign_parameters_id_seq', (SELECT MAX(ID) FROM CAMPAIGN_PARAMETERS))
Drop old Campaign Parameter sequence
Drop old Campaign Parameter table
Migrate table SCENARIO_EXECUTION_HISTORY (sqlite convergence)
INSERT INTO SCENARIO_EXECUTIONS ( ID, SCENARIO_ID, CAMPAIGN_EXECUTION_ID, EXECUTION_TIME, DURATION, STATUS, INFORMATION, ERROR, SCENARIO_TITLE, ENVIRONMENT, USER_ID, DATASET_ID, DATASET_VERSION )
SELECT ID, SCENARIO_ID, (SELECT ID FROM CAMPAIGN_EXECUTION_HISTORY where SCENARIO_EXECUTION_ID = ID), EXECUTION_TIME, DURATION, STATUS, INFORMATION, ERROR, TEST_CASE_TITLE, ENVIRONMENT, USER_ID, DATASET_ID, DATASET_VERSION
FROM SCENARIO_EXECUTION_HISTORY
INSERT INTO SCENARIO_EXECUTIONS_REPORTS ( SCENARIO_EXECUTION_ID, REPORT )
SELECT ID, REPORT
FROM SCENARIO_EXECUTION_HISTORY
ALTER TABLE SCENARIO_EXECUTIONS ALTER COLUMN ID RESTART WITH (SELECT MAX(ID)+1 FROM SCENARIO_EXECUTIONS)
SELECT SETVAL('scenario_executions_id_seq', (SELECT MAX(ID) FROM SCENARIO_EXECUTIONS))
Drop old Scenario executions table sequence
Drop old Scenario executions table index
Drop old Scenario executions table
Migrate table CAMPAIGN_EXECUTION_HISTORY (sqlite convergence)
INSERT INTO CAMPAIGN_EXECUTIONS ( ID, CAMPAIGN_ID, PARTIAL, ENVIRONMENT, USER_ID, DATASET_ID, DATASET_VERSION )
SELECT ID, MIN(CAMPAIGN_ID), EVERY(PARTIAL_EXECUTION), MIN(EXECUTION_ENVIRONMENT), MIN(USER_ID), MIN(DATASET_ID), MIN(DATASET_VERSION)
FROM CAMPAIGN_EXECUTION_HISTORY
GROUP BY ID
UPDATE SCENARIO_EXECUTIONS
SET CAMPAIGN_EXECUTION_ID = (SELECT ceh.ID FROM CAMPAIGN_EXECUTION_HISTORY ceh WHERE ceh.SCENARIO_EXECUTION_ID = SCENARIO_EXECUTIONS.ID)
ALTER TABLE CAMPAIGN_EXECUTIONS ALTER COLUMN ID RESTART WITH (SELECT MAX(ID)+1 FROM CAMPAIGN_EXECUTIONS)
SELECT SETVAL('campaign_executions_id_seq', (SELECT MAX(ID) FROM CAMPAIGN_EXECUTIONS))
Drop old Campaign executions table sequence
Drop old Campaign executions table index
Drop old Campaign executions table
Remove DATASET column
Drop Campaign Parameters table
Add Scenario executions tags
Remove DATASET_VERSION column
Remove DATASET_VERSION column
Add Campaign Scenarios dataset
Change scenarios default dataset id from "null" to null
DEFAULT_DATASET_ID = 'null'
© 2015 - 2025 Weber Informatics LLC | Privacy Policy