Move content of SQL files directly into Liquibase changelogs.
No changes are made to the SQL.
Issue-ID: POLICY-5398
Change-Id: I4bd91d7dfd2dd0ada82e17b4b92cf64175538f43
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE automationcomposition (
- instanceId VARCHAR(255) NOT NULL,
- compositionId VARCHAR(255),
- compositionTargetId VARCHAR(255),
- deployState SMALLINT DEFAULT NULL,
- description VARCHAR(255),
- lockState SMALLINT DEFAULT NULL,
- name VARCHAR(255),
- restarting BOOLEAN,
- stateChangeResult SMALLINT DEFAULT NULL,
- version VARCHAR(255),
- CONSTRAINT PK_AUTOMATIONCOMPOSITION PRIMARY KEY (instanceId)
-);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE automationcompositiondefinition (
- compositionId VARCHAR(255) NOT NULL,
- name VARCHAR(255),
- restarting BOOLEAN,
- serviceTemplate TEXT,
- state SMALLINT DEFAULT NULL,
- stateChangeResult SMALLINT DEFAULT NULL,
- version VARCHAR(255),
- CONSTRAINT PK_AUTOMATIONCOMPOSITIONDEFINITION PRIMARY KEY (compositionId)
-);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE automationcompositionelement (
- elementId VARCHAR(255) NOT NULL,
- definition_name VARCHAR(255),
- definition_version VARCHAR(255),
- deployState SMALLINT DEFAULT NULL,
- description VARCHAR(255),
- instanceId VARCHAR(255),
- lockState SMALLINT DEFAULT NULL,
- message VARCHAR(255),
- operationalState VARCHAR(255),
- outProperties TEXT,
- participantId VARCHAR(255),
- properties TEXT,
- restarting BOOLEAN,
- useState VARCHAR(255),
- CONSTRAINT PK_AUTOMATIONCOMPOSITIONELEMENT PRIMARY KEY (elementId)
-);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE nodetemplatestate (
- nodeTemplateStateId VARCHAR(255) NOT NULL,
- compositionId VARCHAR(255),
- message VARCHAR(255),
- nodeTemplate_name VARCHAR(255),
- nodeTemplate_version VARCHAR(255),
- outProperties TEXT,
- participantId VARCHAR(255),
- restarting BOOLEAN,
- state SMALLINT DEFAULT NULL,
- CONSTRAINT PK_NODETEMPLATESTATE PRIMARY KEY (nodeTemplateStateId)
-);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE participant (
- participantId VARCHAR(255) NOT NULL,
- description VARCHAR(255),
- participantState SMALLINT DEFAULT NULL,
- CONSTRAINT PK_PARTICIPANT PRIMARY KEY (participantId)
-);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE participantsupportedacelements (
- id VARCHAR(255) NOT NULL,
- participantId VARCHAR(255),
- typeName VARCHAR(255),
- typeVersion VARCHAR(255),
- CONSTRAINT PK_PARTICIPANTSUPPORTEDACELEMENTS PRIMARY KEY (id)
-);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE INDEX ac_compositionId ON automationcomposition(compositionId);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE INDEX ac_element_fk ON automationcompositionelement(instanceId);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE INDEX dt_element_fk ON nodetemplatestate(compositionId);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE INDEX supported_element_fk ON participantsupportedacelements(participantId);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcompositionelement
- ADD CONSTRAINT ac_element_fk
- FOREIGN KEY (instanceId)
- REFERENCES automationcomposition (instanceId)
- ON UPDATE RESTRICT
- ON DELETE RESTRICT;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE nodetemplatestate
- ADD CONSTRAINT dt_element_fk
- FOREIGN KEY (compositionId)
- REFERENCES automationcompositiondefinition (compositionId)
- ON UPDATE RESTRICT
- ON DELETE RESTRICT;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE participantsupportedacelements
- ADD CONSTRAINT supported_element_fk
- FOREIGN KEY (participantId)
- REFERENCES participant (participantId)
- ON UPDATE RESTRICT
- ON DELETE RESTRICT;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone DEFAULT Now();
-ALTER TABLE automationcomposition ADD phase SMALLINT DEFAULT 0;
-UPDATE automationcomposition SET restarting = NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcompositiondefinition ADD lastMsg timestamp without time zone DEFAULT Now();
-UPDATE automationcompositiondefinition SET restarting = NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE participantreplica (
- replicaId varchar(255) NOT NULL,
- lastMsg timestamp without time zone DEFAULT Now(),
- participantId varchar(255) DEFAULT NULL,
- participantState SMALLINT DEFAULT NULL,
- CONSTRAINT PK_PARTICIPANT_REPLICA PRIMARY KEY (replicaId)
-);
-
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE participant ADD lastMsg timestamp without time zone DEFAULT Now();
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE INDEX participant_replica_fk ON participantreplica(participantId);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE participantreplica
- ADD CONSTRAINT participant_replica_fk
- FOREIGN KEY (participantId)
- REFERENCES participant (participantId)
- ON UPDATE RESTRICT
- ON DELETE RESTRICT;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE automationcompositionelement SET restarting = NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE nodetemplatestate SET restarting = NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcomposition ADD subState SMALLINT DEFAULT NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcompositionelement ADD subState SMALLINT DEFAULT NULL;
-ALTER TABLE automationcompositionelement ADD stage SMALLINT DEFAULT NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE automationcomposition SET subState=0 WHERE subState is NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE automationcompositionelement SET subState=0 WHERE subState is NULL;
-UPDATE automationcompositionelement SET stage=0 WHERE stage is NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE message (
- messageId varchar(255) NOT NULL,
- identificationId varchar(255) NOT NULL,
- lastMsg timestamp without time zone NOT NULL DEFAULT now(),
- docMessage text NOT NULL,
- CONSTRAINT PK_MESSAGE PRIMARY KEY (messageId)
-);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE TABLE messagejob (
- jobId varchar(255) NOT NULL,
- identificationId varchar(255) NOT NULL,
- jobStarted timestamp without time zone NOT NULL DEFAULT now(),
- CONSTRAINT PK_MESSAGE_JOB PRIMARY KEY (jobId)
-);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE UNIQUE INDEX messagejob_identificationId_index ON messagejob(identificationId);
+++ /dev/null
-/*\r
- * ============LICENSE_START=======================================================\r
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
- * SPDX-License-Identifier: Apache-2.0\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-CREATE TABLE automationcompositionrollback (\r
- instanceId VARCHAR(255) NOT NULL,\r
- compositionId VARCHAR(255) NOT NULL,\r
- elements TEXT NOT NULL,\r
- CONSTRAINT PK_AUTOMATIONCOMPOSITION_ROLLBACK PRIMARY KEY (instanceId)\r
-);\r
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE automationcomposition SET deployState = 2 WHERE deployState IS NULL;
-UPDATE automationcomposition SET lockState = 4 WHERE lockState IS NULL;
-UPDATE automationcomposition SET name = '' WHERE name IS NULL;
-UPDATE automationcomposition SET version = '1.0.0' WHERE version IS NULL;
-UPDATE automationcomposition SET lastMsg = now() WHERE lastMsg IS NULL;
-UPDATE automationcomposition SET subState = 0 WHERE subState IS NULL;
-
-ALTER TABLE automationcomposition ALTER COLUMN compositionid SET NOT NULL;
-ALTER TABLE automationcomposition ALTER COLUMN name SET DEFAULT '';
-ALTER TABLE automationcomposition ALTER COLUMN name SET NOT NULL;
-ALTER TABLE automationcomposition ALTER COLUMN version SET DEFAULT '1.0.0';
-ALTER TABLE automationcomposition ALTER COLUMN version SET NOT NULL;
-ALTER TABLE automationcomposition ALTER COLUMN deployState SET DEFAULT 2;
-ALTER TABLE automationcomposition ALTER COLUMN deployState SET NOT NULL;
-ALTER TABLE automationcomposition ALTER COLUMN lockState SET DEFAULT 4;
-ALTER TABLE automationcomposition ALTER COLUMN lockState SET NOT NULL;
-ALTER TABLE automationcomposition ALTER COLUMN SubState SET DEFAULT 0;
-ALTER TABLE automationcomposition ALTER COLUMN SubState SET NOT NULL;
-ALTER TABLE automationcomposition ALTER COLUMN lastMsg SET NOT NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE automationcompositionelement SET definition_name = '' WHERE definition_name IS NULL;
-UPDATE automationcompositionelement SET definition_version = '0.0.0' WHERE definition_version IS NULL;
-UPDATE automationcompositionelement SET deploystate = 2 WHERE deploystate IS NULL;
-UPDATE automationcompositionelement SET lockState = 4 WHERE lockState IS NULL;
-UPDATE automationcompositionelement SET subState = 0 WHERE subState IS NULL;
-
-ALTER TABLE automationcompositionelement ALTER COLUMN definition_name SET NOT NULL;
-ALTER TABLE automationcompositionelement ALTER COLUMN definition_name SET DEFAULT '';
-ALTER TABLE automationcompositionelement ALTER COLUMN definition_version SET NOT NULL;
-ALTER TABLE automationcompositionelement ALTER COLUMN definition_version SET DEFAULT '0.0.0';
-ALTER TABLE automationcompositionelement ALTER COLUMN deploystate SET NOT NULL;
-ALTER TABLE automationcompositionelement ALTER COLUMN deployState SET DEFAULT 2;
-ALTER TABLE automationcompositionelement ALTER COLUMN lockState SET NOT NULL;
-ALTER TABLE automationcompositionelement ALTER COLUMN lockState SET DEFAULT 4;
-ALTER TABLE automationcompositionelement ALTER COLUMN substate SET NOT NULL;
-ALTER TABLE automationcompositionelement ALTER COLUMN substate SET DEFAULT 0;
-ALTER TABLE automationcompositionelement ALTER COLUMN outproperties SET NOT NULL;
-ALTER TABLE automationcompositionelement ALTER COLUMN outproperties SET DEFAULT '{}';
-ALTER TABLE automationcompositionelement ALTER COLUMN properties SET NOT NULL;
-ALTER TABLE automationcompositionelement ALTER COLUMN properties SET DEFAULT '{}';
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcomposition
- ADD CONSTRAINT ac_composition_fk
- FOREIGN KEY (compositionId)
- REFERENCES automationcompositiondefinition (compositionId)
- ON UPDATE RESTRICT
- ON DELETE RESTRICT;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE automationcompositiondefinition SET name = '' WHERE name IS NULL;
-UPDATE automationcompositiondefinition SET version = '1.0.0' WHERE version IS NULL;
-UPDATE automationcompositiondefinition SET state = 0 WHERE state IS NULL;
-UPDATE automationcompositiondefinition SET lastMsg = now() WHERE lastMsg IS NULL;
-UPDATE automationcompositiondefinition SET serviceTemplate = '' WHERE serviceTemplate IS NULL;
-
-ALTER TABLE automationcompositiondefinition ALTER COLUMN name SET NOT NULL;
-ALTER TABLE automationcompositiondefinition ALTER COLUMN name SET DEFAULT '';
-ALTER TABLE automationcompositiondefinition ALTER COLUMN version SET NOT NULL;
-ALTER TABLE automationcompositiondefinition ALTER COLUMN version SET DEFAULT '1.0.0';
-ALTER TABLE automationcompositiondefinition ALTER COLUMN state SET NOT NULL;
-ALTER TABLE automationcompositiondefinition ALTER COLUMN state SET DEFAULT 0;
-ALTER TABLE automationcompositiondefinition ALTER COLUMN serviceTemplate SET NOT NULL;
-ALTER TABLE automationcompositiondefinition ALTER COLUMN serviceTemplate SET DEFAULT '';
-ALTER TABLE automationcompositiondefinition ALTER COLUMN lastMsg SET NOT NULL;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE nodetemplatestate SET nodeTemplate_name = '' WHERE nodeTemplate_name IS NULL;
-UPDATE nodetemplatestate SET nodeTemplate_version = '1.0.0' WHERE nodeTemplate_version IS NULL;
-UPDATE nodetemplatestate SET outProperties = '{}' WHERE outProperties IS NULL;
-UPDATE nodetemplatestate SET state = 0 WHERE state IS NULL;
-
-ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_name SET NOT NULL;
-ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_name SET DEFAULT '';
-ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_version SET NOT NULL;
-ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_version SET DEFAULT '1.0.0';
-ALTER TABLE nodetemplatestate ALTER COLUMN outProperties SET NOT NULL;
-ALTER TABLE nodetemplatestate ALTER COLUMN outProperties SET DEFAULT '{}';
-ALTER TABLE nodetemplatestate ALTER COLUMN state SET NOT NULL;
-ALTER TABLE nodetemplatestate ALTER COLUMN state SET DEFAULT 0;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-CREATE INDEX mb_identificationId_index ON message(identificationId);
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE participantreplica SET lastMsg = now() WHERE lastMsg IS NULL;
-UPDATE participantreplica SET participantState = '1' WHERE participantState IS NULL;
-
-ALTER TABLE participantreplica ALTER COLUMN lastMsg SET NOT NULL;
-ALTER TABLE participantreplica ALTER COLUMN participantId SET NOT NULL;
-ALTER TABLE participantreplica ALTER COLUMN participantId SET DEFAULT '';
-ALTER TABLE participantreplica ALTER COLUMN participantState SET NOT NULL;
-ALTER TABLE participantreplica ALTER COLUMN participantState SET DEFAULT 1;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-UPDATE participantsupportedacelements SET typeName = '' WHERE typeName IS NULL;
-UPDATE participantsupportedacelements SET typeVersion = '1.0.0' WHERE typeVersion IS NULL;
-
-ALTER TABLE participantsupportedacelements ALTER COLUMN participantId SET NOT NULL;
-ALTER TABLE participantsupportedacelements ALTER COLUMN participantId SET DEFAULT '';
-ALTER TABLE participantsupportedacelements ALTER COLUMN typeName SET NOT NULL;
-ALTER TABLE participantsupportedacelements ALTER COLUMN typeName SET DEFAULT '';
-ALTER TABLE participantsupportedacelements ALTER COLUMN typeVersion SET NOT NULL;
-ALTER TABLE participantsupportedacelements ALTER COLUMN typeVersion SET DEFAULT '1.0.0';
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcomposition
- ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
-ALTER TABLE automationcomposition ALTER COLUMN phase TYPE INTEGER;
-ALTER TABLE automationcomposition DROP COLUMN restarting;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcompositiondefinition
- ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
-ALTER TABLE automationcompositiondefinition DROP COLUMN restarting;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE automationcompositionelement ALTER COLUMN stage TYPE INTEGER;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE participant DROP COLUMN participantState;
-ALTER TABLE participant DROP COLUMN lastMsg;
+++ /dev/null
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-ALTER TABLE participantreplica ALTER COLUMN participantId DROP DEFAULT;
- tableExists:
tableName: automationcomposition
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0100-automationcomposition.sql
+ - sql:
+ sql: |
+ CREATE TABLE automationcomposition (
+ instanceId VARCHAR(255) NOT NULL,
+ compositionId VARCHAR(255),
+ compositionTargetId VARCHAR(255),
+ deployState SMALLINT DEFAULT NULL,
+ description VARCHAR(255),
+ lockState SMALLINT DEFAULT NULL,
+ name VARCHAR(255),
+ restarting BOOLEAN,
+ stateChangeResult SMALLINT DEFAULT NULL,
+ version VARCHAR(255),
+ CONSTRAINT PK_AUTOMATIONCOMPOSITION PRIMARY KEY (instanceId)
+ );
- changeSet:
id: 1400-2
- tableExists:
tableName: automationcompositiondefinition
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0200-automationcompositiondefinition.sql
+ - sql:
+ sql: |
+ CREATE TABLE automationcompositiondefinition (
+ compositionId VARCHAR(255) NOT NULL,
+ name VARCHAR(255),
+ restarting BOOLEAN,
+ serviceTemplate TEXT,
+ state SMALLINT DEFAULT NULL,
+ stateChangeResult SMALLINT DEFAULT NULL,
+ version VARCHAR(255),
+ CONSTRAINT PK_AUTOMATIONCOMPOSITIONDEFINITION PRIMARY KEY (compositionId)
+ );
- changeSet:
id: 1400-3
- tableExists:
tableName: automationcompositionelement
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0300-automationcompositionelement.sql
+ - sql:
+ sql: |
+ CREATE TABLE automationcompositionelement (
+ elementId VARCHAR(255) NOT NULL,
+ definition_name VARCHAR(255),
+ definition_version VARCHAR(255),
+ deployState SMALLINT DEFAULT NULL,
+ description VARCHAR(255),
+ instanceId VARCHAR(255),
+ lockState SMALLINT DEFAULT NULL,
+ message VARCHAR(255),
+ operationalState VARCHAR(255),
+ outProperties TEXT,
+ participantId VARCHAR(255),
+ properties TEXT,
+ restarting BOOLEAN,
+ useState VARCHAR(255),
+ CONSTRAINT PK_AUTOMATIONCOMPOSITIONELEMENT PRIMARY KEY (elementId)
+ );
- changeSet:
id: 1400-4
- tableExists:
tableName: nodetemplatestate
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0400-nodetemplatestate.sql
+ - sql:
+ sql: |
+ CREATE TABLE nodetemplatestate (
+ nodeTemplateStateId VARCHAR(255) NOT NULL,
+ compositionId VARCHAR(255),
+ message VARCHAR(255),
+ nodeTemplate_name VARCHAR(255),
+ nodeTemplate_version VARCHAR(255),
+ outProperties TEXT,
+ participantId VARCHAR(255),
+ restarting BOOLEAN,
+ state SMALLINT DEFAULT NULL,
+ CONSTRAINT PK_NODETEMPLATESTATE PRIMARY KEY (nodeTemplateStateId)
+ );
- changeSet:
id: 1400-5
- tableExists:
tableName: participant
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0500-participant.sql
+ - sql:
+ sql: |
+ CREATE TABLE participant (
+ participantId VARCHAR(255) NOT NULL,
+ description VARCHAR(255),
+ participantState SMALLINT DEFAULT NULL,
+ CONSTRAINT PK_PARTICIPANT PRIMARY KEY (participantId)
+ );
- changeSet:
id: 1400-6
- tableExists:
tableName: participantsupportedacelements
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0600-participantsupportedelements.sql
+ - sql:
+ sql: |
+ CREATE TABLE participantsupportedacelements (
+ id VARCHAR(255) NOT NULL,
+ participantId VARCHAR(255),
+ typeName VARCHAR(255),
+ typeVersion VARCHAR(255),
+ CONSTRAINT PK_PARTICIPANTSUPPORTEDACELEMENTS PRIMARY KEY (id)
+ );
- changeSet:
id: 1400-7
- indexExists:
indexName: ac_compositionId
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0700-ac_compositionId_index.sql
+ - sql:
+ sql: CREATE INDEX ac_compositionId ON automationcomposition(compositionId);
- changeSet:
id: 1400-8
- indexExists:
indexName: ac_element_fk
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0800-ac_element_fk_index.sql
+ - sql:
+ sql: CREATE INDEX ac_element_fk ON automationcompositionelement(instanceId);
- changeSet:
id: 1400-9
- indexExists:
indexName: dt_element_fk
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/0900-dt_element_fk_index.sql
+ - sql:
+ sql: CREATE INDEX dt_element_fk ON nodetemplatestate(compositionId);
- changeSet:
id: 1400-10
- indexExists:
indexName: supported_element_fk
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/1000-supported_element_fk_index.sql
+ - sql:
+ sql: CREATE INDEX supported_element_fk ON participantsupportedacelements(participantId);
- changeSet:
id: 1400-11
foreignKeyName: ac_element_fk
foreignKeyTableName: automationcompositionelement
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/1100-automationcompositionelement_fk.sql
+ - sql:
+ sql: |
+ ALTER TABLE automationcompositionelement
+ ADD CONSTRAINT ac_element_fk
+ FOREIGN KEY (instanceId)
+ REFERENCES automationcomposition (instanceId)
+ ON UPDATE RESTRICT
+ ON DELETE RESTRICT;
- changeSet:
id: 1400-12
foreignKeyName: dt_element_fk
foreignKeyTableName: nodetemplatestate
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/1200-nodetemplate_fk.sql
+ - sql:
+ sql: |
+ ALTER TABLE nodetemplatestate
+ ADD CONSTRAINT dt_element_fk
+ FOREIGN KEY (compositionId)
+ REFERENCES automationcompositiondefinition (compositionId)
+ ON UPDATE RESTRICT
+ ON DELETE RESTRICT;
- changeSet:
id: 1400-13
foreignKeyName: supported_element_fk
foreignKeyTableName: participantsupportedacelements
changes:
- - sqlFile:
- path: db/changelog/1400/upgrade/1300-participantsupportedelements_fk.sql
+ - sql:
+ sql: |
+ ALTER TABLE participantsupportedacelements
+ ADD CONSTRAINT supported_element_fk
+ FOREIGN KEY (participantId)
+ REFERENCES participant (participantId)
+ ON UPDATE RESTRICT
+ ON DELETE RESTRICT;
tableName: automationcomposition
columnName: lastMsg
changes:
- - sqlFile:
- path: db/changelog/1500/upgrade/0100-automationcomposition.sql
+ - sql:
+ sql: |
+ ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone DEFAULT Now();
+ ALTER TABLE automationcomposition ADD phase SMALLINT DEFAULT 0;
+ UPDATE automationcomposition SET restarting = NULL;
- changeSet:
id: 1500-2
tableName: automationcompositiondefinition
columnName: lastMsg
changes:
- - sqlFile:
- path: db/changelog/1500/upgrade/0200-automationcompositiondefinition.sql
+ - sql:
+ sql: |
+ ALTER TABLE automationcompositiondefinition ADD lastMsg timestamp without time zone DEFAULT Now();
+ UPDATE automationcompositiondefinition SET restarting = NULL;
- changeSet:
id: 1500-3
- tableExists:
tableName: participantreplica
changes:
- - sqlFile:
- path: db/changelog/1500/upgrade/0300-participantreplica.sql
+ - sql:
+ sql: |
+ CREATE TABLE participantreplica (
+ replicaId varchar(255) NOT NULL,
+ lastMsg timestamp without time zone DEFAULT Now(),
+ participantId varchar(255) DEFAULT NULL,
+ participantState SMALLINT DEFAULT NULL,
+ CONSTRAINT PK_PARTICIPANT_REPLICA PRIMARY KEY (replicaId)
+ );
- changeSet:
id: 1500-4
tableName: participant
columnName: lastMsg
changes:
- - sqlFile:
- path: db/changelog/1500/upgrade/0400-participant.sql
+ - sql:
+ sql: ALTER TABLE participant ADD lastMsg timestamp without time zone DEFAULT Now();
- changeSet:
id: 1500-5
- indexExists:
indexName: participant_replica_fk
changes:
- - sqlFile:
- path: db/changelog/1500/upgrade/0500-participant_replica_fk_index.sql
+ - sql:
+ sql: CREATE INDEX participant_replica_fk ON participantreplica(participantId);
- changeSet:
id: 1500-6
foreignKeyName: participant_replica_fk
foreignKeyTableName: participantreplica
changes:
- - sqlFile:
- path: db/changelog/1500/upgrade/0600-participant_replica_fk.sql
+ - sql:
+ sql: |
+ ALTER TABLE participantreplica
+ ADD CONSTRAINT participant_replica_fk
+ FOREIGN KEY (participantId)
+ REFERENCES participant (participantId)
+ ON UPDATE RESTRICT
+ ON DELETE RESTRICT;
- changeSet:
id: 1500-7
author: policy
changes:
- - sqlFile:
- path: db/changelog/1500/upgrade/0700-automationcompositionelement.sql
+ - sql:
+ sql: UPDATE automationcompositionelement SET restarting = NULL;
- changeSet:
id: 1500-8
author: policy
changes:
- - sqlFile:
- path: db/changelog/1500/upgrade/0800-nodetemplatestate.sql
+ - sql:
+ sql: UPDATE nodetemplatestate SET restarting = NULL;
tableName: automationcomposition
columnName: subState
changes:
- - sqlFile:
- path: db/changelog/1600/upgrade/0100-automationcomposition.sql
+ - sql:
+ sql: ALTER TABLE automationcomposition ADD subState SMALLINT DEFAULT NULL;
- changeSet:
id: 1600-2
tableName: automationcompositionelement
columnName: subState
changes:
- - sqlFile:
- path: db/changelog/1600/upgrade/0200-automationcompositionelement.sql
+ - sql:
+ sql: |
+ ALTER TABLE automationcompositionelement ADD subState SMALLINT DEFAULT NULL;
+ ALTER TABLE automationcompositionelement ADD stage SMALLINT DEFAULT NULL;
id: 1601-1
author: policy
changes:
- - sqlFile:
- path: db/changelog/1601/upgrade/0100-automationcomposition.sql
+ - sql:
+ sql: UPDATE automationcomposition SET subState=0 WHERE subState is NULL;
- changeSet:
id: 1601-2
author: policy
changes:
- - sqlFile:
- path: db/changelog/1601/upgrade/0200-automationcompositionelement.sql
+ - sql:
+ sql: |
+ UPDATE automationcompositionelement SET subState=0 WHERE subState is NULL;
+ UPDATE automationcompositionelement SET stage=0 WHERE stage is NULL;
- tableExists:
tableName: message
changes:
- - sqlFile:
- path: db/changelog/1700/upgrade/0100-message.sql
+ - sql:
+ sql: |
+ CREATE TABLE message (
+ messageId varchar(255) NOT NULL,
+ identificationId varchar(255) NOT NULL,
+ lastMsg timestamp without time zone NOT NULL DEFAULT now(),
+ docMessage text NOT NULL,
+ CONSTRAINT PK_MESSAGE PRIMARY KEY (messageId)
+ );
- changeSet:
id: 1700-2
- tableExists:
tableName: messagejob
changes:
- - sqlFile:
- path: db/changelog/1700/upgrade/0200-messagejob.sql
+ - sql:
+ sql: |
+ CREATE TABLE messagejob (
+ jobId varchar(255) NOT NULL,
+ identificationId varchar(255) NOT NULL,
+ jobStarted timestamp without time zone NOT NULL DEFAULT now(),
+ CONSTRAINT PK_MESSAGE_JOB PRIMARY KEY (jobId)
+ );
- changeSet:
id: 1700-3
- indexExists:
indexName: messagejob_identificationId_index
changes:
- - sqlFile:
- path: db/changelog/1700/upgrade/0300-messagejob_identificationId_index.sql
+ - sql:
+ sql: CREATE UNIQUE INDEX messagejob_identificationId_index ON messagejob(identificationId);
- tableExists:
tableName: automationcompositionrollback
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0100-automationcompositionrollback.sql
+ - sql:
+ sql: |
+ CREATE TABLE automationcompositionrollback (
+ instanceId VARCHAR(255) NOT NULL,
+ compositionId VARCHAR(255) NOT NULL,
+ elements TEXT NOT NULL,
+ CONSTRAINT PK_AUTOMATIONCOMPOSITION_ROLLBACK PRIMARY KEY (instanceId)
+ );
- changeSet:
id: 1701-2
author: policy
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0200-automationcomposition.sql
+ - sql:
+ sql: |
+ UPDATE automationcomposition SET deployState = 2 WHERE deployState IS NULL;
+ UPDATE automationcomposition SET lockState = 4 WHERE lockState IS NULL;
+ UPDATE automationcomposition SET name = '' WHERE name IS NULL;
+ UPDATE automationcomposition SET version = '1.0.0' WHERE version IS NULL;
+ UPDATE automationcomposition SET lastMsg = now() WHERE lastMsg IS NULL;
+ UPDATE automationcomposition SET subState = 0 WHERE subState IS NULL;
+
+ ALTER TABLE automationcomposition ALTER COLUMN compositionid SET NOT NULL;
+ ALTER TABLE automationcomposition ALTER COLUMN name SET DEFAULT '';
+ ALTER TABLE automationcomposition ALTER COLUMN name SET NOT NULL;
+ ALTER TABLE automationcomposition ALTER COLUMN version SET DEFAULT '1.0.0';
+ ALTER TABLE automationcomposition ALTER COLUMN version SET NOT NULL;
+ ALTER TABLE automationcomposition ALTER COLUMN deployState SET DEFAULT 2;
+ ALTER TABLE automationcomposition ALTER COLUMN deployState SET NOT NULL;
+ ALTER TABLE automationcomposition ALTER COLUMN lockState SET DEFAULT 4;
+ ALTER TABLE automationcomposition ALTER COLUMN lockState SET NOT NULL;
+ ALTER TABLE automationcomposition ALTER COLUMN SubState SET DEFAULT 0;
+ ALTER TABLE automationcomposition ALTER COLUMN SubState SET NOT NULL;
+ ALTER TABLE automationcomposition ALTER COLUMN lastMsg SET NOT NULL;
- changeSet:
id: 1701-3
author: policy
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0300-automationcompositionelement.sql
+ - sql:
+ sql: |
+ UPDATE automationcompositionelement SET definition_name = '' WHERE definition_name IS NULL;
+ UPDATE automationcompositionelement SET definition_version = '0.0.0' WHERE definition_version IS NULL;
+ UPDATE automationcompositionelement SET deploystate = 2 WHERE deploystate IS NULL;
+ UPDATE automationcompositionelement SET lockState = 4 WHERE lockState IS NULL;
+ UPDATE automationcompositionelement SET subState = 0 WHERE subState IS NULL;
+
+ ALTER TABLE automationcompositionelement ALTER COLUMN definition_name SET NOT NULL;
+ ALTER TABLE automationcompositionelement ALTER COLUMN definition_name SET DEFAULT '';
+ ALTER TABLE automationcompositionelement ALTER COLUMN definition_version SET NOT NULL;
+ ALTER TABLE automationcompositionelement ALTER COLUMN definition_version SET DEFAULT '0.0.0';
+ ALTER TABLE automationcompositionelement ALTER COLUMN deploystate SET NOT NULL;
+ ALTER TABLE automationcompositionelement ALTER COLUMN deployState SET DEFAULT 2;
+ ALTER TABLE automationcompositionelement ALTER COLUMN lockState SET NOT NULL;
+ ALTER TABLE automationcompositionelement ALTER COLUMN lockState SET DEFAULT 4;
+ ALTER TABLE automationcompositionelement ALTER COLUMN substate SET NOT NULL;
+ ALTER TABLE automationcompositionelement ALTER COLUMN substate SET DEFAULT 0;
+ ALTER TABLE automationcompositionelement ALTER COLUMN outproperties SET NOT NULL;
+ ALTER TABLE automationcompositionelement ALTER COLUMN outproperties SET DEFAULT '{}';
+ ALTER TABLE automationcompositionelement ALTER COLUMN properties SET NOT NULL;
+ ALTER TABLE automationcompositionelement ALTER COLUMN properties SET DEFAULT '{}';
- changeSet:
id: 1701-4
foreignKeyName: ac_composition_fk
foreignKeyTableName: automationcomposition
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0400-automationcomposition_fk.sql
+ - sql:
+ sql: |
+ ALTER TABLE automationcomposition
+ ADD CONSTRAINT ac_composition_fk
+ FOREIGN KEY (compositionId)
+ REFERENCES automationcompositiondefinition (compositionId)
+ ON UPDATE RESTRICT
+ ON DELETE RESTRICT;
- changeSet:
id: 1701-5
author: policy
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql
+ - sql:
+ sql: |
+ UPDATE automationcompositiondefinition SET name = '' WHERE name IS NULL;
+ UPDATE automationcompositiondefinition SET version = '1.0.0' WHERE version IS NULL;
+ UPDATE automationcompositiondefinition SET state = 0 WHERE state IS NULL;
+ UPDATE automationcompositiondefinition SET lastMsg = now() WHERE lastMsg IS NULL;
+ UPDATE automationcompositiondefinition SET serviceTemplate = '' WHERE serviceTemplate IS NULL;
+
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN name SET NOT NULL;
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN name SET DEFAULT '';
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN version SET NOT NULL;
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN version SET DEFAULT '1.0.0';
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN state SET NOT NULL;
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN state SET DEFAULT 0;
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN serviceTemplate SET NOT NULL;
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN serviceTemplate SET DEFAULT '';
+ ALTER TABLE automationcompositiondefinition ALTER COLUMN lastMsg SET NOT NULL;
- changeSet:
id: 1701-6
author: policy
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0600-nodetemplatestate.sql
+ - sql:
+ sql: |
+ UPDATE nodetemplatestate SET nodeTemplate_name = '' WHERE nodeTemplate_name IS NULL;
+ UPDATE nodetemplatestate SET nodeTemplate_version = '1.0.0' WHERE nodeTemplate_version IS NULL;
+ UPDATE nodetemplatestate SET outProperties = '{}' WHERE outProperties IS NULL;
+ UPDATE nodetemplatestate SET state = 0 WHERE state IS NULL;
+
+ ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_name SET NOT NULL;
+ ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_name SET DEFAULT '';
+ ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_version SET NOT NULL;
+ ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_version SET DEFAULT '1.0.0';
+ ALTER TABLE nodetemplatestate ALTER COLUMN outProperties SET NOT NULL;
+ ALTER TABLE nodetemplatestate ALTER COLUMN outProperties SET DEFAULT '{}';
+ ALTER TABLE nodetemplatestate ALTER COLUMN state SET NOT NULL;
+ ALTER TABLE nodetemplatestate ALTER COLUMN state SET DEFAULT 0;
- changeSet:
id: 1701-7
- indexExists:
indexName: mb_identificationId_index
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0700-mb_identificationId_index.sql
+ - sql:
+ sql: CREATE INDEX mb_identificationId_index ON message(identificationId);
- changeSet:
id: 1701-8
author: policy
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0800-participantreplica.sql
+ - sql:
+ sql: |
+ UPDATE participantreplica SET lastMsg = now() WHERE lastMsg IS NULL;
+ UPDATE participantreplica SET participantState = '1' WHERE participantState IS NULL;
+
+ ALTER TABLE participantreplica ALTER COLUMN lastMsg SET NOT NULL;
+ ALTER TABLE participantreplica ALTER COLUMN participantId SET NOT NULL;
+ ALTER TABLE participantreplica ALTER COLUMN participantId SET DEFAULT '';
+ ALTER TABLE participantreplica ALTER COLUMN participantState SET NOT NULL;
+ ALTER TABLE participantreplica ALTER COLUMN participantState SET DEFAULT 1;
- changeSet:
id: 1701-9
author: policy
changes:
- - sqlFile:
- path: db/changelog/1701/upgrade/0900-participantsupportedacelements.sql
+ - sql:
+ sql: |
+ UPDATE participantsupportedacelements SET typeName = '' WHERE typeName IS NULL;
+ UPDATE participantsupportedacelements SET typeVersion = '1.0.0' WHERE typeVersion IS NULL;
+
+ ALTER TABLE participantsupportedacelements ALTER COLUMN participantId SET NOT NULL;
+ ALTER TABLE participantsupportedacelements ALTER COLUMN participantId SET DEFAULT '';
+ ALTER TABLE participantsupportedacelements ALTER COLUMN typeName SET NOT NULL;
+ ALTER TABLE participantsupportedacelements ALTER COLUMN typeName SET DEFAULT '';
+ ALTER TABLE participantsupportedacelements ALTER COLUMN typeVersion SET NOT NULL;
+ ALTER TABLE participantsupportedacelements ALTER COLUMN typeVersion SET DEFAULT '1.0.0';
databaseChangeLog:
- objectQuotingStrategy: QUOTE_ONLY_RESERVED_WORDS
+
+ - changeSet:
+ author: policy
+ id: 1702-1
+ preConditions:
+ - onFail: MARK_RAN
+ - not:
+ - columnExists:
+ tableName: automationcomposition
+ columnName: revisionId
+ changes:
+ - sql:
+ sql: |
+ ALTER TABLE automationcomposition
+ ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
+ ALTER TABLE automationcomposition ALTER COLUMN phase TYPE INTEGER;
+ ALTER TABLE automationcomposition DROP COLUMN restarting;
+
- changeSet:
author: policy
- id: 1702
+ id: 1702-2
preConditions:
- not:
- columnExists:
- tableName: automationcomposition
- columnName: revisionId
- onFail: MARK_RAN
+ - onFail: MARK_RAN
+ - not:
+ - columnExists:
+ tableName: automationcompositiondefinition
+ columnName: revisionId
+ changes:
+ - sql:
+ sql: |
+ ALTER TABLE automationcompositiondefinition
+ ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
+ ALTER TABLE automationcompositiondefinition DROP COLUMN restarting;
+
+ - changeSet:
+ author: policy
+ id: 1702-3
+ changes:
+ - sql:
+ sql: ALTER TABLE automationcompositionelement ALTER COLUMN stage TYPE INTEGER;
+
+ - changeSet:
+ author: policy
+ id: 1702-4
+ preConditions:
+ - onFail: MARK_RAN
+ - columnExists:
+ tableName: participant
+ columnName: participantState
+ changes:
+ - sql:
+ sql: |
+ ALTER TABLE participant DROP COLUMN participantState;
+ ALTER TABLE participant DROP COLUMN lastMsg;
+
+ - changeSet:
+ author: policy
+ id: 1702-5
changes:
- - sqlFile:
- path: db/changelog/1702/upgrade/0100-automationcomposition.sql
- - sqlFile:
- path: db/changelog/1702/upgrade/0200-automationcompositiondefinition.sql
- - sqlFile:
- path: db/changelog/1702/upgrade/0300-automationcompositionelement.sql
- - sqlFile:
- path: db/changelog/1702/upgrade/0400-participant.sql
- - sqlFile:
- path: db/changelog/1702/upgrade/0500-participantreplica.sql
+ - sql:
+ sql: ALTER TABLE participantreplica ALTER COLUMN participantId DROP DEFAULT;