-
Estimate
Task Effort Notes Disable failing test ( @Disabled)0.1h Immediate fix to unblock build. Analyze Hibernate vs SQL schema DDL 0.5h Compare generated schema with manual file. Update schema-postgresql.sqlto includeON DELETE CASCADE0.5h Optional, only if desired parity. Re-enable and verify test 0.2h Confirm cascade works under embedded PG. Total Estimate: 1.3h (Low complexity, deferred)
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Version |
1.0
|
| Sprints |
n/a
|
| Customer |
n/a
|
Issue Votes (0)
Description
The test
ProjectRepositoryTest.whenGitRepoDeleted_thenAssociatedProjectsAreDeletedfails under embedded PostgreSQL because theON DELETE CASCADEconstraint betweengit_reposandprojectsis not active in the test schema.This issue does not occur in production, where Hibernate DDL auto-generation (
ddl-auto=update) correctly creates the cascade constraint based on the following annotations:The failure arises only because the test environment uses:
and relies on a static
schema-postgresql.sqlfile that does not replicate Hibernate’s generated DDL.Therefore, this is a test-environment artifact, not a production data-integrity issue.
Resolution Plan
schema-postgresql.sqlto include the cascade rule ongit_repo_id.ddl-auto=create-drop) during tests for full realism.Impact
ON DELETE CASCADE.Metadata
rk@tigase.netchecklater,tests,db-cascade,low-impact