--- /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
+ ALTER COLUMN compositionid DROP NOT NULL,
+ ALTER COLUMN name DROP NOT NULL,
+ ALTER COLUMN name DROP DEFAULT,
+ ALTER COLUMN version DROP NOT NULL,
+ ALTER COLUMN version DROP DEFAULT,
+ ALTER COLUMN deployState DROP NOT NULL,
+ ALTER COLUMN deployState DROP DEFAULT,
+ ALTER COLUMN lockState DROP NOT NULL,
+ ALTER COLUMN lockState DROP DEFAULT,
+ ALTER COLUMN SubState DROP NOT NULL,
+ ALTER COLUMN SubState DROP DEFAULT,
+ ALTER COLUMN lastMsg DROP 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=========================================================
+ */
+
+ALTER TABLE automationcompositionelement
+ ALTER COLUMN definition_name DROP NOT NULL,
+ ALTER COLUMN definition_name DROP DEFAULT,
+ ALTER COLUMN definition_version DROP NOT NULL,
+ ALTER COLUMN definition_version DROP DEFAULT,
+ ALTER COLUMN deploystate DROP NOT NULL,
+ ALTER COLUMN deployState DROP DEFAULT,
+ ALTER COLUMN lockState DROP NOT NULL,
+ ALTER COLUMN lockState DROP DEFAULT,
+ ALTER COLUMN substate DROP NOT NULL,
+ ALTER COLUMN substate DROP DEFAULT,
+ ALTER COLUMN outproperties DROP NOT NULL,
+ ALTER COLUMN outproperties DROP DEFAULT,
+ ALTER COLUMN properties DROP NOT NULL,
+ ALTER COLUMN properties DROP 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 DROP CONSTRAINT IF EXISTS ac_composition_fk;
--- /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
+ ALTER COLUMN name DROP NOT NULL,
+ ALTER COLUMN name DROP DEFAULT,
+ ALTER COLUMN version DROP NOT NULL,
+ ALTER COLUMN version DROP DEFAULT,
+ ALTER COLUMN state DROP NOT NULL,
+ ALTER COLUMN state DROP DEFAULT,
+ ALTER COLUMN serviceTemplate DROP NOT NULL,
+ ALTER COLUMN serviceTemplate DROP DEFAULT,
+ ALTER COLUMN lastMsg DROP 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=========================================================
+ */
+
+ALTER TABLE nodetemplatestate
+ ALTER COLUMN nodeTemplate_name DROP NOT NULL,
+ ALTER COLUMN nodeTemplate_name DROP DEFAULT,
+ ALTER COLUMN nodeTemplate_version DROP NOT NULL,
+ ALTER COLUMN nodeTemplate_version DROP DEFAULT,
+ ALTER COLUMN outProperties DROP NOT NULL,
+ ALTER COLUMN outProperties DROP DEFAULT,
+ ALTER COLUMN state DROP NOT NULL,
+ ALTER COLUMN state DROP DEFAULT;
--- /dev/null
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2025 Nordix Foundation
+ * ================================================================================
+ * 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=========================================================
+ */
+
+DROP INDEX IF EXISTS mb_identificationId_index;
--- /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 lastMsg DROP NOT NULL,
+ ALTER COLUMN participantId DROP NOT NULL,
+ ALTER COLUMN participantId DROP DEFAULT,
+ ALTER COLUMN participantState DROP NOT NULL,
+ ALTER COLUMN participantState DROP 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 participantsupportedacelements
+ ALTER COLUMN participantId DROP NOT NULL,
+ ALTER COLUMN participantId DROP DEFAULT,
+ ALTER COLUMN typeName DROP NOT NULL,
+ ALTER COLUMN typeName DROP DEFAULT,
+ ALTER COLUMN typeVersion DROP NOT NULL,
+ ALTER COLUMN typeVersion DROP 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=========================================================
+ */
+
+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 COLUMN name SET DEFAULT '',
+ ALTER COLUMN name SET NOT NULL,
+ ALTER COLUMN version SET DEFAULT '1.0.0',
+ ALTER COLUMN version SET NOT NULL,
+ ALTER COLUMN deployState SET DEFAULT 2,
+ ALTER COLUMN deployState SET NOT NULL,
+ ALTER COLUMN lockState SET DEFAULT 4,
+ ALTER COLUMN lockState SET NOT NULL,
+ ALTER COLUMN SubState SET DEFAULT 0,
+ ALTER COLUMN SubState SET NOT NULL,
+ 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 COLUMN definition_name SET DEFAULT '',
+ ALTER COLUMN definition_version SET NOT NULL,
+ ALTER COLUMN definition_version SET DEFAULT '0.0.0',
+ ALTER COLUMN deploystate SET NOT NULL,
+ ALTER COLUMN deployState SET DEFAULT 2,
+ ALTER COLUMN lockState SET NOT NULL,
+ ALTER COLUMN lockState SET DEFAULT 4,
+ ALTER COLUMN substate SET NOT NULL,
+ ALTER COLUMN substate SET DEFAULT 0,
+ ALTER COLUMN outproperties SET NOT NULL,
+ ALTER COLUMN outproperties SET DEFAULT '{}',
+ ALTER COLUMN properties SET NOT NULL,
+ 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 COLUMN name SET DEFAULT '',
+ ALTER COLUMN version SET NOT NULL,
+ ALTER COLUMN version SET DEFAULT '1.0.0',
+ ALTER COLUMN state SET NOT NULL,
+ ALTER COLUMN state SET DEFAULT 0,
+ ALTER COLUMN serviceTemplate SET NOT NULL,
+ ALTER COLUMN serviceTemplate SET DEFAULT '',
+ 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 COLUMN nodeTemplate_name SET DEFAULT '',
+ ALTER COLUMN nodeTemplate_version SET NOT NULL,
+ ALTER COLUMN nodeTemplate_version SET DEFAULT '1.0.0',
+ ALTER COLUMN outProperties SET NOT NULL,
+ ALTER COLUMN outProperties SET DEFAULT '{}',
+ ALTER COLUMN state SET NOT NULL,
+ 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 COLUMN participantId SET NOT NULL,
+ ALTER COLUMN participantId SET DEFAULT '',
+ ALTER COLUMN participantState SET NOT NULL,
+ 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 COLUMN participantId SET DEFAULT '',
+ ALTER COLUMN typeName SET NOT NULL,
+ ALTER COLUMN typeName SET DEFAULT '',
+ ALTER COLUMN typeVersion SET NOT NULL,
+ ALTER COLUMN typeVersion SET DEFAULT '1.0.0';