From 805cdef5bfefbc8ea09d96afb744198efeea2b88 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Fri, 1 Aug 2025 10:24:20 +0100 Subject: [PATCH] Use Java/JPA naming for SQL objects (Liquibase #10) This commit renames objects in the SQL so they match the Java/JPA, e.g. AutomationComposition instead of automationcomposition Issue-ID: POLICY-5398 Change-Id: If6d0e6f95be3f8c6095cfd3c61d7d4d3ef0a8f80 Signed-off-by: danielhanrahan --- .../resources/db/changelog/changelog-1400.yaml | 50 +++--- .../resources/db/changelog/changelog-1500.yaml | 44 +++--- .../resources/db/changelog/changelog-1600.yaml | 12 +- .../resources/db/changelog/changelog-1601.yaml | 6 +- .../resources/db/changelog/changelog-1700.yaml | 10 +- .../resources/db/changelog/changelog-1701.yaml | 168 ++++++++++----------- .../resources/db/changelog/changelog-1702.yaml | 30 ++-- 7 files changed, 160 insertions(+), 160 deletions(-) diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml index 1628bb89e..d185aa38b 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml @@ -26,11 +26,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: automationcomposition + tableName: AutomationComposition changes: - sql: sql: | - CREATE TABLE automationcomposition ( + CREATE TABLE AutomationComposition ( instanceId VARCHAR(255) NOT NULL, compositionId VARCHAR(255), compositionTargetId VARCHAR(255), @@ -51,11 +51,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: automationcompositiondefinition + tableName: AutomationCompositionDefinition changes: - sql: sql: | - CREATE TABLE automationcompositiondefinition ( + CREATE TABLE AutomationCompositionDefinition ( compositionId VARCHAR(255) NOT NULL, name VARCHAR(255), restarting BOOLEAN, @@ -73,11 +73,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: automationcompositionelement + tableName: AutomationCompositionElement changes: - sql: sql: | - CREATE TABLE automationcompositionelement ( + CREATE TABLE AutomationCompositionElement ( elementId VARCHAR(255) NOT NULL, definition_name VARCHAR(255), definition_version VARCHAR(255), @@ -102,11 +102,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: nodetemplatestate + tableName: NodeTemplateState changes: - sql: sql: | - CREATE TABLE nodetemplatestate ( + CREATE TABLE NodeTemplateState ( nodeTemplateStateId VARCHAR(255) NOT NULL, compositionId VARCHAR(255), message VARCHAR(255), @@ -126,11 +126,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: participant + tableName: Participant changes: - sql: sql: | - CREATE TABLE participant ( + CREATE TABLE Participant ( participantId VARCHAR(255) NOT NULL, description VARCHAR(255), participantState SMALLINT DEFAULT NULL, @@ -144,11 +144,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: participantsupportedacelements + tableName: ParticipantSupportedAcElements changes: - sql: sql: | - CREATE TABLE participantsupportedacelements ( + CREATE TABLE ParticipantSupportedAcElements ( id VARCHAR(255) NOT NULL, participantId VARCHAR(255), typeName VARCHAR(255), @@ -166,7 +166,7 @@ databaseChangeLog: indexName: ac_compositionId changes: - sql: - sql: CREATE INDEX ac_compositionId ON automationcomposition(compositionId); + sql: CREATE INDEX ac_compositionId ON AutomationComposition(compositionId); - changeSet: id: 1400-8 @@ -178,7 +178,7 @@ databaseChangeLog: indexName: ac_element_fk changes: - sql: - sql: CREATE INDEX ac_element_fk ON automationcompositionelement(instanceId); + sql: CREATE INDEX ac_element_fk ON AutomationCompositionElement(instanceId); - changeSet: id: 1400-9 @@ -190,7 +190,7 @@ databaseChangeLog: indexName: dt_element_fk changes: - sql: - sql: CREATE INDEX dt_element_fk ON nodetemplatestate(compositionId); + sql: CREATE INDEX dt_element_fk ON NodeTemplateState(compositionId); - changeSet: id: 1400-10 @@ -202,7 +202,7 @@ databaseChangeLog: indexName: supported_element_fk changes: - sql: - sql: CREATE INDEX supported_element_fk ON participantsupportedacelements(participantId); + sql: CREATE INDEX supported_element_fk ON ParticipantSupportedAcElements(participantId); - changeSet: id: 1400-11 @@ -212,14 +212,14 @@ databaseChangeLog: - not: - foreignKeyConstraintExists: foreignKeyName: ac_element_fk - foreignKeyTableName: automationcompositionelement + foreignKeyTableName: AutomationCompositionElement changes: - sql: sql: | - ALTER TABLE automationcompositionelement + ALTER TABLE AutomationCompositionElement ADD CONSTRAINT ac_element_fk FOREIGN KEY (instanceId) - REFERENCES automationcomposition (instanceId) + REFERENCES AutomationComposition (instanceId) ON UPDATE RESTRICT ON DELETE RESTRICT; @@ -231,14 +231,14 @@ databaseChangeLog: - not: - foreignKeyConstraintExists: foreignKeyName: dt_element_fk - foreignKeyTableName: nodetemplatestate + foreignKeyTableName: NodeTemplateState changes: - sql: sql: | - ALTER TABLE nodetemplatestate + ALTER TABLE NodeTemplateState ADD CONSTRAINT dt_element_fk FOREIGN KEY (compositionId) - REFERENCES automationcompositiondefinition (compositionId) + REFERENCES AutomationCompositionDefinition (compositionId) ON UPDATE RESTRICT ON DELETE RESTRICT; @@ -250,13 +250,13 @@ databaseChangeLog: - not: - foreignKeyConstraintExists: foreignKeyName: supported_element_fk - foreignKeyTableName: participantsupportedacelements + foreignKeyTableName: ParticipantSupportedAcElements changes: - sql: sql: | - ALTER TABLE participantsupportedacelements + ALTER TABLE ParticipantSupportedAcElements ADD CONSTRAINT supported_element_fk FOREIGN KEY (participantId) - REFERENCES participant (participantId) + REFERENCES Participant (participantId) ON UPDATE RESTRICT ON DELETE RESTRICT; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml index e42f19f3a..28c8b7ca5 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml @@ -26,11 +26,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: automationcomposition + tableName: AutomationComposition columnName: lastMsg changes: - sql: - sql: ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone DEFAULT Now(); + sql: ALTER TABLE AutomationComposition ADD lastMsg timestamp without time zone DEFAULT Now(); - changeSet: id: 1500-2 @@ -39,11 +39,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: automationcomposition + tableName: AutomationComposition columnName: phase changes: - sql: - sql: ALTER TABLE automationcomposition ADD phase SMALLINT DEFAULT 0; + sql: ALTER TABLE AutomationComposition ADD phase SMALLINT DEFAULT 0; - changeSet: id: 1500-3 @@ -52,11 +52,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: automationcompositiondefinition + tableName: AutomationCompositionDefinition columnName: lastMsg changes: - sql: - sql: ALTER TABLE automationcompositiondefinition ADD lastMsg timestamp without time zone DEFAULT Now(); + sql: ALTER TABLE AutomationCompositionDefinition ADD lastMsg timestamp without time zone DEFAULT Now(); - changeSet: id: 1500-4 @@ -65,11 +65,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: participantreplica + tableName: ParticipantReplica changes: - sql: sql: | - CREATE TABLE participantreplica ( + CREATE TABLE ParticipantReplica ( replicaId varchar(255) NOT NULL, lastMsg timestamp without time zone DEFAULT Now(), participantId varchar(255) DEFAULT NULL, @@ -84,11 +84,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: participant + tableName: Participant columnName: lastMsg changes: - sql: - sql: ALTER TABLE participant ADD lastMsg timestamp without time zone DEFAULT Now(); + sql: ALTER TABLE Participant ADD lastMsg timestamp without time zone DEFAULT Now(); - changeSet: id: 1500-6 @@ -100,7 +100,7 @@ databaseChangeLog: indexName: participant_replica_fk changes: - sql: - sql: CREATE INDEX participant_replica_fk ON participantreplica(participantId); + sql: CREATE INDEX participant_replica_fk ON ParticipantReplica(participantId); - changeSet: id: 1500-7 @@ -110,14 +110,14 @@ databaseChangeLog: - not: - foreignKeyConstraintExists: foreignKeyName: participant_replica_fk - foreignKeyTableName: participantreplica + foreignKeyTableName: ParticipantReplica changes: - sql: sql: | - ALTER TABLE participantreplica + ALTER TABLE ParticipantReplica ADD CONSTRAINT participant_replica_fk FOREIGN KEY (participantId) - REFERENCES participant (participantId) + REFERENCES Participant (participantId) ON UPDATE RESTRICT ON DELETE RESTRICT; @@ -127,11 +127,11 @@ databaseChangeLog: preConditions: - onFail: MARK_RAN - columnExists: - tableName: automationcomposition + tableName: AutomationComposition columnName: restarting changes: - sql: - sql: UPDATE automationcomposition SET restarting = NULL; + sql: UPDATE AutomationComposition SET restarting = NULL; - changeSet: id: 1500-9 @@ -139,11 +139,11 @@ databaseChangeLog: preConditions: - onFail: MARK_RAN - columnExists: - tableName: automationcompositiondefinition + tableName: AutomationCompositionDefinition columnName: restarting changes: - sql: - sql: UPDATE automationcompositiondefinition SET restarting = NULL; + sql: UPDATE AutomationCompositionDefinition SET restarting = NULL; - changeSet: id: 1500-10 @@ -151,11 +151,11 @@ databaseChangeLog: preConditions: - onFail: MARK_RAN - columnExists: - tableName: automationcompositionelement + tableName: AutomationCompositionElement columnName: restarting changes: - sql: - sql: UPDATE automationcompositionelement SET restarting = NULL; + sql: UPDATE AutomationCompositionElement SET restarting = NULL; - changeSet: id: 1500-11 @@ -163,8 +163,8 @@ databaseChangeLog: preConditions: - onFail: MARK_RAN - columnExists: - tableName: nodetemplatestate + tableName: NodeTemplateState columnName: restarting changes: - sql: - sql: UPDATE nodetemplatestate SET restarting = NULL; + sql: UPDATE NodeTemplateState SET restarting = NULL; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml index 2b017ec7b..0077657b0 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml @@ -26,11 +26,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: automationcomposition + tableName: AutomationComposition columnName: subState changes: - sql: - sql: ALTER TABLE automationcomposition ADD subState SMALLINT DEFAULT NULL; + sql: ALTER TABLE AutomationComposition ADD subState SMALLINT DEFAULT NULL; - changeSet: id: 1600-2 @@ -39,11 +39,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: automationcompositionelement + tableName: AutomationCompositionElement columnName: subState changes: - sql: - sql: ALTER TABLE automationcompositionelement ADD subState SMALLINT DEFAULT NULL; + sql: ALTER TABLE AutomationCompositionElement ADD subState SMALLINT DEFAULT NULL; - changeSet: id: 1600-3 @@ -52,8 +52,8 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: automationcompositionelement + tableName: AutomationCompositionElement columnName: stage changes: - sql: - sql: ALTER TABLE automationcompositionelement ADD stage SMALLINT DEFAULT NULL; + sql: ALTER TABLE AutomationCompositionElement ADD stage SMALLINT DEFAULT NULL; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml index 7f57f988c..4fb1b1bbe 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml @@ -24,18 +24,18 @@ databaseChangeLog: author: policy changes: - sql: - sql: UPDATE automationcomposition SET subState=0 WHERE subState is NULL; + sql: UPDATE AutomationComposition SET subState=0 WHERE subState is NULL; - changeSet: id: 1601-2 author: policy changes: - sql: - sql: UPDATE automationcompositionelement SET subState=0 WHERE subState is NULL; + sql: UPDATE AutomationCompositionElement SET subState=0 WHERE subState is NULL; - changeSet: id: 1601-3 author: policy changes: - sql: - sql: UPDATE automationcompositionelement SET stage=0 WHERE stage is NULL; + sql: UPDATE AutomationCompositionElement SET stage=0 WHERE stage is NULL; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml index a1f09185b..396072a4d 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml @@ -26,11 +26,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: message + tableName: Message changes: - sql: sql: | - CREATE TABLE message ( + CREATE TABLE Message ( messageId varchar(255) NOT NULL, identificationId varchar(255) NOT NULL, lastMsg timestamp without time zone NOT NULL DEFAULT now(), @@ -45,11 +45,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: messagejob + tableName: MessageJob changes: - sql: sql: | - CREATE TABLE messagejob ( + CREATE TABLE MessageJob ( jobId varchar(255) NOT NULL, identificationId varchar(255) NOT NULL, jobStarted timestamp without time zone NOT NULL DEFAULT now(), @@ -66,4 +66,4 @@ databaseChangeLog: indexName: messagejob_identificationId_index changes: - sql: - sql: CREATE UNIQUE INDEX messagejob_identificationId_index ON messagejob(identificationId); + sql: CREATE UNIQUE INDEX messagejob_identificationId_index ON MessageJob(identificationId); diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml index 1ef507e81..7092d1caf 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml @@ -26,11 +26,11 @@ databaseChangeLog: - onFail: MARK_RAN - not: - tableExists: - tableName: automationcompositionrollback + tableName: AutomationCompositionRollback changes: - sql: sql: | - CREATE TABLE automationcompositionrollback ( + CREATE TABLE AutomationCompositionRollback ( instanceId VARCHAR(255) NOT NULL, compositionId VARCHAR(255) NOT NULL, elements TEXT NOT NULL, @@ -43,7 +43,7 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcomposition ALTER COLUMN compositionid SET NOT NULL; + ALTER TABLE AutomationComposition ALTER COLUMN compositionId SET NOT NULL; - changeSet: id: 1701-3 @@ -51,9 +51,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcomposition ALTER COLUMN name SET DEFAULT ''; - UPDATE automationcomposition SET name = '' WHERE name IS NULL; - ALTER TABLE automationcomposition ALTER COLUMN name SET NOT NULL; + ALTER TABLE AutomationComposition ALTER COLUMN name SET DEFAULT ''; + UPDATE AutomationComposition SET name = '' WHERE name IS NULL; + ALTER TABLE AutomationComposition ALTER COLUMN name SET NOT NULL; - changeSet: id: 1701-4 @@ -61,9 +61,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcomposition ALTER COLUMN version SET DEFAULT '1.0.0'; - UPDATE automationcomposition SET version = '1.0.0' WHERE version IS NULL; - ALTER TABLE automationcomposition ALTER COLUMN version SET NOT NULL; + ALTER TABLE AutomationComposition ALTER COLUMN version SET DEFAULT '1.0.0'; + UPDATE AutomationComposition SET version = '1.0.0' WHERE version IS NULL; + ALTER TABLE AutomationComposition ALTER COLUMN version SET NOT NULL; - changeSet: id: 1701-5 @@ -71,9 +71,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcomposition ALTER COLUMN deployState SET DEFAULT 2; - UPDATE automationcomposition SET deployState = 2 WHERE deployState IS NULL; - ALTER TABLE automationcomposition ALTER COLUMN deployState SET NOT NULL; + ALTER TABLE AutomationComposition ALTER COLUMN deployState SET DEFAULT 2; + UPDATE AutomationComposition SET deployState = 2 WHERE deployState IS NULL; + ALTER TABLE AutomationComposition ALTER COLUMN deployState SET NOT NULL; - changeSet: id: 1701-6 @@ -81,9 +81,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcomposition ALTER COLUMN lockState SET DEFAULT 4; - UPDATE automationcomposition SET lockState = 4 WHERE lockState IS NULL; - ALTER TABLE automationcomposition ALTER COLUMN lockState SET NOT NULL; + ALTER TABLE AutomationComposition ALTER COLUMN lockState SET DEFAULT 4; + UPDATE AutomationComposition SET lockState = 4 WHERE lockState IS NULL; + ALTER TABLE AutomationComposition ALTER COLUMN lockState SET NOT NULL; - changeSet: id: 1701-7 @@ -91,9 +91,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcomposition ALTER COLUMN SubState SET DEFAULT 0; - UPDATE automationcomposition SET subState = 0 WHERE subState IS NULL; - ALTER TABLE automationcomposition ALTER COLUMN SubState SET NOT NULL; + ALTER TABLE AutomationComposition ALTER COLUMN subState SET DEFAULT 0; + UPDATE AutomationComposition SET subState = 0 WHERE subState IS NULL; + ALTER TABLE AutomationComposition ALTER COLUMN subState SET NOT NULL; - changeSet: id: 1701-8 @@ -101,8 +101,8 @@ databaseChangeLog: changes: - sql: sql: | - UPDATE automationcomposition SET lastMsg = now() WHERE lastMsg IS NULL; - ALTER TABLE automationcomposition ALTER COLUMN lastMsg SET NOT NULL; + UPDATE AutomationComposition SET lastMsg = now() WHERE lastMsg IS NULL; + ALTER TABLE AutomationComposition ALTER COLUMN lastMsg SET NOT NULL; - changeSet: id: 1701-9 @@ -110,9 +110,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositionelement ALTER COLUMN definition_name SET DEFAULT ''; - UPDATE automationcompositionelement SET definition_name = '' WHERE definition_name IS NULL; - ALTER TABLE automationcompositionelement ALTER COLUMN definition_name SET NOT NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN definition_name SET DEFAULT ''; + UPDATE AutomationCompositionElement SET definition_name = '' WHERE definition_name IS NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN definition_name SET NOT NULL; - changeSet: id: 1701-10 @@ -120,9 +120,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositionelement ALTER COLUMN definition_version SET DEFAULT '0.0.0'; - UPDATE automationcompositionelement SET definition_version = '0.0.0' WHERE definition_version IS NULL; - ALTER TABLE automationcompositionelement ALTER COLUMN definition_version SET NOT NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN definition_version SET DEFAULT '0.0.0'; + UPDATE AutomationCompositionElement SET definition_version = '0.0.0' WHERE definition_version IS NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN definition_version SET NOT NULL; - changeSet: id: 1701-11 @@ -130,9 +130,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositionelement ALTER COLUMN deployState SET DEFAULT 2; - UPDATE automationcompositionelement SET deploystate = 2 WHERE deploystate IS NULL; - ALTER TABLE automationcompositionelement ALTER COLUMN deploystate SET NOT NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN deployState SET DEFAULT 2; + UPDATE AutomationCompositionElement SET deployState = 2 WHERE deployState IS NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN deployState SET NOT NULL; - changeSet: id: 1701-12 @@ -140,9 +140,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositionelement ALTER COLUMN lockState SET DEFAULT 4; - UPDATE automationcompositionelement SET lockState = 4 WHERE lockState IS NULL; - ALTER TABLE automationcompositionelement ALTER COLUMN lockState SET NOT NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN lockState SET DEFAULT 4; + UPDATE AutomationCompositionElement SET lockState = 4 WHERE lockState IS NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN lockState SET NOT NULL; - changeSet: id: 1701-13 @@ -150,9 +150,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositionelement ALTER COLUMN substate SET DEFAULT 0; - UPDATE automationcompositionelement SET subState = 0 WHERE subState IS NULL; - ALTER TABLE automationcompositionelement ALTER COLUMN substate SET NOT NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN subState SET DEFAULT 0; + UPDATE AutomationCompositionElement SET subState = 0 WHERE subState IS NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN subState SET NOT NULL; - changeSet: id: 1701-14 @@ -160,8 +160,8 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositionelement ALTER COLUMN outproperties SET DEFAULT '{}'; - ALTER TABLE automationcompositionelement ALTER COLUMN outproperties SET NOT NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN outProperties SET DEFAULT '{}'; + ALTER TABLE AutomationCompositionElement ALTER COLUMN outProperties SET NOT NULL; - changeSet: id: 1701-15 @@ -169,8 +169,8 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositionelement ALTER COLUMN properties SET DEFAULT '{}'; - ALTER TABLE automationcompositionelement ALTER COLUMN properties SET NOT NULL; + ALTER TABLE AutomationCompositionElement ALTER COLUMN properties SET DEFAULT '{}'; + ALTER TABLE AutomationCompositionElement ALTER COLUMN properties SET NOT NULL; - changeSet: id: 1701-16 @@ -180,14 +180,14 @@ databaseChangeLog: - not: - foreignKeyConstraintExists: foreignKeyName: ac_composition_fk - foreignKeyTableName: automationcomposition + foreignKeyTableName: AutomationComposition changes: - sql: sql: | - ALTER TABLE automationcomposition + ALTER TABLE AutomationComposition ADD CONSTRAINT ac_composition_fk FOREIGN KEY (compositionId) - REFERENCES automationcompositiondefinition (compositionId) + REFERENCES AutomationCompositionDefinition (compositionId) ON UPDATE RESTRICT ON DELETE RESTRICT; @@ -197,9 +197,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositiondefinition ALTER COLUMN name SET DEFAULT ''; - UPDATE automationcompositiondefinition SET name = '' WHERE name IS NULL; - ALTER TABLE automationcompositiondefinition ALTER COLUMN name SET NOT NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN name SET DEFAULT ''; + UPDATE AutomationCompositionDefinition SET name = '' WHERE name IS NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN name SET NOT NULL; - changeSet: id: 1701-18 @@ -207,9 +207,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositiondefinition ALTER COLUMN version SET DEFAULT '1.0.0'; - UPDATE automationcompositiondefinition SET version = '1.0.0' WHERE version IS NULL; - ALTER TABLE automationcompositiondefinition ALTER COLUMN version SET NOT NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN version SET DEFAULT '1.0.0'; + UPDATE AutomationCompositionDefinition SET version = '1.0.0' WHERE version IS NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN version SET NOT NULL; - changeSet: id: 1701-19 @@ -217,9 +217,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositiondefinition ALTER COLUMN state SET DEFAULT 0; - UPDATE automationcompositiondefinition SET state = 0 WHERE state IS NULL; - ALTER TABLE automationcompositiondefinition ALTER COLUMN state SET NOT NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN state SET DEFAULT 0; + UPDATE AutomationCompositionDefinition SET state = 0 WHERE state IS NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN state SET NOT NULL; - changeSet: id: 1701-20 @@ -227,9 +227,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE automationcompositiondefinition ALTER COLUMN serviceTemplate SET DEFAULT ''; - UPDATE automationcompositiondefinition SET serviceTemplate = '' WHERE serviceTemplate IS NULL; - ALTER TABLE automationcompositiondefinition ALTER COLUMN serviceTemplate SET NOT NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN serviceTemplate SET DEFAULT ''; + UPDATE AutomationCompositionDefinition SET serviceTemplate = '' WHERE serviceTemplate IS NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN serviceTemplate SET NOT NULL; - changeSet: id: 1701-21 @@ -237,8 +237,8 @@ databaseChangeLog: changes: - sql: sql: | - UPDATE automationcompositiondefinition SET lastMsg = now() WHERE lastMsg IS NULL; - ALTER TABLE automationcompositiondefinition ALTER COLUMN lastMsg SET NOT NULL; + UPDATE AutomationCompositionDefinition SET lastMsg = now() WHERE lastMsg IS NULL; + ALTER TABLE AutomationCompositionDefinition ALTER COLUMN lastMsg SET NOT NULL; - changeSet: id: 1701-22 @@ -246,9 +246,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_name SET DEFAULT ''; - UPDATE nodetemplatestate SET nodeTemplate_name = '' WHERE nodeTemplate_name IS NULL; - ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_name SET NOT NULL; + ALTER TABLE NodeTemplateState ALTER COLUMN nodeTemplate_name SET DEFAULT ''; + UPDATE NodeTemplateState SET nodeTemplate_name = '' WHERE nodeTemplate_name IS NULL; + ALTER TABLE NodeTemplateState ALTER COLUMN nodeTemplate_name SET NOT NULL; - changeSet: id: 1701-23 @@ -256,9 +256,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_version SET DEFAULT '1.0.0'; - UPDATE nodetemplatestate SET nodeTemplate_version = '1.0.0' WHERE nodeTemplate_version IS NULL; - ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_version SET NOT NULL; + ALTER TABLE NodeTemplateState ALTER COLUMN nodeTemplate_version SET DEFAULT '1.0.0'; + UPDATE NodeTemplateState SET nodeTemplate_version = '1.0.0' WHERE nodeTemplate_version IS NULL; + ALTER TABLE NodeTemplateState ALTER COLUMN nodeTemplate_version SET NOT NULL; - changeSet: id: 1701-24 @@ -266,9 +266,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE nodetemplatestate ALTER COLUMN outProperties SET DEFAULT '{}'; - UPDATE nodetemplatestate SET outProperties = '{}' WHERE outProperties IS NULL; - ALTER TABLE nodetemplatestate ALTER COLUMN outProperties SET NOT NULL; + ALTER TABLE NodeTemplateState ALTER COLUMN outProperties SET DEFAULT '{}'; + UPDATE NodeTemplateState SET outProperties = '{}' WHERE outProperties IS NULL; + ALTER TABLE NodeTemplateState ALTER COLUMN outProperties SET NOT NULL; - changeSet: id: 1701-25 @@ -276,9 +276,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE nodetemplatestate ALTER COLUMN state SET DEFAULT 0; - UPDATE nodetemplatestate SET state = 0 WHERE state IS NULL; - ALTER TABLE nodetemplatestate ALTER COLUMN state SET NOT NULL; + ALTER TABLE NodeTemplateState ALTER COLUMN state SET DEFAULT 0; + UPDATE NodeTemplateState SET state = 0 WHERE state IS NULL; + ALTER TABLE NodeTemplateState ALTER COLUMN state SET NOT NULL; - changeSet: id: 1701-26 @@ -290,7 +290,7 @@ databaseChangeLog: indexName: mb_identificationId_index changes: - sql: - sql: CREATE INDEX mb_identificationId_index ON message(identificationId); + sql: CREATE INDEX mb_identificationId_index ON Message(identificationId); - changeSet: id: 1701-27 @@ -298,8 +298,8 @@ databaseChangeLog: changes: - sql: sql: | - UPDATE participantreplica SET lastMsg = now() WHERE lastMsg IS NULL; - ALTER TABLE participantreplica ALTER COLUMN lastMsg SET NOT NULL; + UPDATE ParticipantReplica SET lastMsg = now() WHERE lastMsg IS NULL; + ALTER TABLE ParticipantReplica ALTER COLUMN lastMsg SET NOT NULL; - changeSet: id: 1701-28 @@ -307,8 +307,8 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE participantreplica ALTER COLUMN participantId SET DEFAULT ''; - ALTER TABLE participantreplica ALTER COLUMN participantId SET NOT NULL; + ALTER TABLE ParticipantReplica ALTER COLUMN participantId SET DEFAULT ''; + ALTER TABLE ParticipantReplica ALTER COLUMN participantId SET NOT NULL; - changeSet: id: 1701-29 @@ -316,9 +316,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE participantreplica ALTER COLUMN participantState SET DEFAULT 1; - UPDATE participantreplica SET participantState = '1' WHERE participantState IS NULL; - ALTER TABLE participantreplica ALTER COLUMN participantState SET NOT NULL; + ALTER TABLE ParticipantReplica ALTER COLUMN participantState SET DEFAULT 1; + UPDATE ParticipantReplica SET participantState = '1' WHERE participantState IS NULL; + ALTER TABLE ParticipantReplica ALTER COLUMN participantState SET NOT NULL; - changeSet: id: 1701-30 @@ -326,8 +326,8 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE participantsupportedacelements ALTER COLUMN participantId SET DEFAULT ''; - ALTER TABLE participantsupportedacelements ALTER COLUMN participantId SET NOT NULL; + ALTER TABLE ParticipantSupportedAcElements ALTER COLUMN participantId SET DEFAULT ''; + ALTER TABLE ParticipantSupportedAcElements ALTER COLUMN participantId SET NOT NULL; - changeSet: id: 1701-31 @@ -335,9 +335,9 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE participantsupportedacelements ALTER COLUMN typeName SET DEFAULT ''; - UPDATE participantsupportedacelements SET typeName = '' WHERE typeName IS NULL; - ALTER TABLE participantsupportedacelements ALTER COLUMN typeName SET NOT NULL; + ALTER TABLE ParticipantSupportedAcElements ALTER COLUMN typeName SET DEFAULT ''; + UPDATE ParticipantSupportedAcElements SET typeName = '' WHERE typeName IS NULL; + ALTER TABLE ParticipantSupportedAcElements ALTER COLUMN typeName SET NOT NULL; - changeSet: id: 1701-32 @@ -345,6 +345,6 @@ databaseChangeLog: changes: - sql: sql: | - ALTER TABLE participantsupportedacelements ALTER COLUMN typeVersion SET DEFAULT '1.0.0'; - UPDATE participantsupportedacelements SET typeVersion = '1.0.0' WHERE typeVersion IS NULL; - ALTER TABLE participantsupportedacelements ALTER COLUMN typeVersion SET NOT NULL; + ALTER TABLE ParticipantSupportedAcElements ALTER COLUMN typeVersion SET DEFAULT '1.0.0'; + UPDATE ParticipantSupportedAcElements SET typeVersion = '1.0.0' WHERE typeVersion IS NULL; + ALTER TABLE ParticipantSupportedAcElements ALTER COLUMN typeVersion SET NOT NULL; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml index e3be3746b..b645fdc1b 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml @@ -26,12 +26,12 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: automationcomposition + tableName: AutomationComposition columnName: revisionId changes: - sql: sql: | - ALTER TABLE automationcomposition + ALTER TABLE AutomationComposition ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; - changeSet: @@ -41,12 +41,12 @@ databaseChangeLog: - onFail: MARK_RAN - not: - columnExists: - tableName: automationcompositiondefinition + tableName: AutomationCompositionDefinition columnName: revisionId changes: - sql: sql: | - ALTER TABLE automationcompositiondefinition + ALTER TABLE AutomationCompositionDefinition ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; - changeSet: @@ -54,21 +54,21 @@ databaseChangeLog: id: 1702-3 changes: - sql: - sql: ALTER TABLE automationcomposition ALTER COLUMN phase TYPE INTEGER; + sql: ALTER TABLE AutomationComposition ALTER COLUMN phase TYPE INTEGER; - changeSet: author: policy id: 1702-4 changes: - sql: - sql: ALTER TABLE automationcompositionelement ALTER COLUMN stage TYPE INTEGER; + sql: ALTER TABLE AutomationCompositionElement ALTER COLUMN stage TYPE INTEGER; - changeSet: author: policy id: 1702-5 changes: - sql: - sql: ALTER TABLE participantreplica ALTER COLUMN participantId DROP DEFAULT; + sql: ALTER TABLE ParticipantReplica ALTER COLUMN participantId DROP DEFAULT; - changeSet: author: policy @@ -76,11 +76,11 @@ databaseChangeLog: preConditions: - onFail: MARK_RAN - columnExists: - tableName: automationcomposition + tableName: AutomationComposition columnName: restarting changes: - sql: - sql: ALTER TABLE automationcomposition DROP COLUMN restarting; + sql: ALTER TABLE AutomationComposition DROP COLUMN restarting; - changeSet: author: policy @@ -88,11 +88,11 @@ databaseChangeLog: preConditions: - onFail: MARK_RAN - columnExists: - tableName: automationcompositiondefinition + tableName: AutomationCompositionDefinition columnName: restarting changes: - sql: - sql: ALTER TABLE automationcompositiondefinition DROP COLUMN restarting; + sql: ALTER TABLE AutomationCompositionDefinition DROP COLUMN restarting; - changeSet: author: policy @@ -100,11 +100,11 @@ databaseChangeLog: preConditions: - onFail: MARK_RAN - columnExists: - tableName: participant + tableName: Participant columnName: participantState changes: - sql: - sql: ALTER TABLE participant DROP COLUMN participantState; + sql: ALTER TABLE Participant DROP COLUMN participantState; - changeSet: author: policy @@ -112,8 +112,8 @@ databaseChangeLog: preConditions: - onFail: MARK_RAN - columnExists: - tableName: participant + tableName: Participant columnName: lastMsg changes: - sql: - sql: ALTER TABLE participant DROP COLUMN lastMsg; + sql: ALTER TABLE Participant DROP COLUMN lastMsg; -- 2.16.6