Feature/464 add soft delete feature - #511
Merged
Merged
Conversation
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a soft-delete mechanism for SCL files by adding an is_deleted flag, updating repository implementations to respect it, and making the feature togglable via configuration.
- Add
is_deletedcolumn to thescl_filetable with a Flyway migration. - Introduce
SoftDeleteCompasSclDataPostgreSQLRepositoryand a producer to switch implementations based on a feature flag. - Update all queries to exclude soft-deleted records and document the new column.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| repository/pom.xml | Added quarkus-arc dependency to support CDI in Quarkus configuration. |
| repository-postgresql/src/main/resources/.../V1_5__add_soft_delete_flag.sql | Migration to add the is_deleted boolean column with default false. |
| repository-postgresql/src/main/java/.../SoftDeleteCompasSclDataPostgreSQLRepository.java | New repository variant overriding delete to set the soft-delete flag instead of hard delete. |
| repository-postgresql/src/main/java/.../CompasSclDataPostgreSQLRepositoryConfiguration.java | CDI producer that selects between the default and soft-delete repository based on a config property. |
| repository-postgresql/src/main/java/.../CompasSclDataPostgreSQLRepository.java | Added AND scl_file.is_deleted = false to existing queries to filter out soft-deleted records. |
| doc/postgresql.md | Documented the new is_deleted column in the table schema. |
| doc/development.md | New guide for running the application locally with Keycloak and PostgreSQL. |
| app/src/test/resources/docker-compose.yml | Docker Compose setup for Keycloak and PostgreSQL to support local development/testing. |
| app/src/main/resources/application.properties | Declared the soft-delete-enabled feature flag property. |
| app/src/main/resources/application-local.properties | Enabled soft delete and Flyway migrations for local development profile. |
| app/src/main/resources/application-dev-postgresql.properties | Changed default DB credentials for the dev PostgreSQL profile to compas/compas. |
| README.md | Added link to the new development documentation. |
Comments suppressed due to low confidence (2)
doc/postgresql.md:40
- The 'Null' column is marked as 'False', but the migration does not enforce NOT NULL. Either update this to 'True' or add
NOT NULLin the migration.
| is_deleted | boolean | False | Flag indicating whether the record is marked as deleted |
repository-postgresql/src/main/java/org/lfenergy/compas/scl/data/repository/postgresql/SoftDeleteCompasSclDataPostgreSQLRepository.java:27
- [nitpick] Consider adding unit or integration tests to verify that the
deletemethod correctly setsis_deletedand that filtered queries exclude soft-deleted records.
public void delete(SclFileType type, UUID id) {
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
david-monichi
force-pushed
the
feature/464_add-soft-delete-feature
branch
from
July 16, 2025 20:30
3f78132 to
fc68569
Compare
…sion) Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
clepski
requested changes
Jul 21, 2025
Signed-off-by: David Monichi <david.monichi@bearingpoint.com>
david-monichi
force-pushed
the
feature/464_add-soft-delete-feature
branch
from
July 21, 2025 12:27
066fcc0 to
f8c6b88
Compare
|
clepski
approved these changes
Jul 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.