-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MODCON-130] - Adjust process to add ECS tenant with soft deleted functionality #140
Conversation
} | ||
|
||
private void validateExistTenant(TenantEntity tenant) { | ||
if (Boolean.FALSE.equals(tenant.getIsDeleted()) || tenant.getIsDeleted() == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically lets write migration script to update all existing tenants with isDeleted=false, it will simplify our java code to avoid additional null checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -59,7 +59,7 @@ | |||
<changeSet id="MOCON-127@add-is-deleted-flag" author="azizbekxm"> | |||
<addColumn tableName="tenant"> | |||
<column name="is_deleted" type="boolean" defaultValueBoolean="false"> | |||
<constraints unique="false" /> | |||
<constraints unique="false" nullable="false"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this added because there shouldn't be null
|
||
validateTenantForUpdateOperation(consortiumId, tenantId, tenantDto, existedTenant); | ||
// isDeleted flag cannot be changed by put request | ||
tenantDto.setIsDeleted(existedTenant.getIsDeleted()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After found issue relate to ablitiy of updating isCentral and isDeleted field, introduced improvement in order to prevent future unwanted changes
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Purpose
https://issues.folio.org/browse/MODCON-127
Approach
TODOS and Open Questions
Learning
Pre-Merge Checklist:
Before merging this PR, please go through the following list and take appropriate actions.
If there are breaking changes, please STOP and consider the following:
Ideally, all the PRs involved in breaking changes would be merged on the same day
to avoid breaking the folio-testing environment.
Communication is paramount if that is to be achieved,
especially as the number of inter-module and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems,
ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.