diff --git a/modules/apps/object/object-service/bnd.bnd b/modules/apps/object/object-service/bnd.bnd index 625ffe4f22e146..2da6d1acc7a6ef 100644 --- a/modules/apps/object/object-service/bnd.bnd +++ b/modules/apps/object/object-service/bnd.bnd @@ -2,6 +2,6 @@ Bundle-Name: Liferay Object Service Bundle-SymbolicName: com.liferay.object.service Bundle-Version: 1.0.167 Liferay-Client-Extension-Batch: com/liferay/object/internal/batch -Liferay-Require-SchemaVersion: 7.1.0 +Liferay-Require-SchemaVersion: 7.2.0 Liferay-Service: true -dsannotations-options: inherit \ No newline at end of file diff --git a/modules/apps/object/object-service/src/main/java/com/liferay/object/internal/upgrade/registry/ObjectServiceUpgradeStepRegistrator.java b/modules/apps/object/object-service/src/main/java/com/liferay/object/internal/upgrade/registry/ObjectServiceUpgradeStepRegistrator.java index f7f3f1a61af4d4..1b6da2ce30f0f2 100644 --- a/modules/apps/object/object-service/src/main/java/com/liferay/object/internal/upgrade/registry/ObjectServiceUpgradeStepRegistrator.java +++ b/modules/apps/object/object-service/src/main/java/com/liferay/object/internal/upgrade/registry/ObjectServiceUpgradeStepRegistrator.java @@ -316,6 +316,11 @@ protected String[][] getTableAndPrimaryKeyColumnNames() { "7.0.0", "7.1.0", new com.liferay.object.internal.upgrade.v7_1_0. SchemaUpgradeProcess()); + + registry.register( + "7.1.0", "7.2.0", + new com.liferay.object.internal.upgrade.v7_2_0. + ObjectRelationshipUpgradeProcess()); } @Reference diff --git a/modules/apps/object/object-service/src/main/java/com/liferay/object/internal/upgrade/v7_2_0/ObjectRelationshipUpgradeProcess.java b/modules/apps/object/object-service/src/main/java/com/liferay/object/internal/upgrade/v7_2_0/ObjectRelationshipUpgradeProcess.java new file mode 100644 index 00000000000000..8afcd025321fd8 --- /dev/null +++ b/modules/apps/object/object-service/src/main/java/com/liferay/object/internal/upgrade/v7_2_0/ObjectRelationshipUpgradeProcess.java @@ -0,0 +1,29 @@ +/** + * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.object.internal.upgrade.v7_2_0; + +import com.liferay.portal.kernel.upgrade.UpgradeProcess; +import com.liferay.portal.kernel.upgrade.UpgradeProcessFactory; +import com.liferay.portal.kernel.upgrade.UpgradeStep; + +/** + * @author Gabriel Albuquerque + */ +public class ObjectRelationshipUpgradeProcess extends UpgradeProcess { + + @Override + protected void doUpgrade() throws Exception { + runSQL("update ObjectRelationship set system = [$FALSE$]"); + } + + @Override + protected UpgradeStep[] getPreUpgradeSteps() { + return new UpgradeStep[] { + UpgradeProcessFactory.addColumns( + "ObjectRelationship", "system BOOLEAN") + }; + } +}