Skip to content

Commit

Permalink
LPS-193812 Upgrade Process
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielwas committed Aug 24, 2023
1 parent 52cf5df commit 241b69b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/apps/object/object-service/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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")
};
}
}

0 comments on commit 241b69b

Please sign in to comment.