Closed jo-elimu closed 3 weeks ago
The main change involves setting the Hibernate dialect directly to org.hibernate.dialect.MySQL5Dialect
in the Java code and modifying the JPA schema export SQL to remove CASCADE constraints and update column types. Additionally, comments in properties files were updated to clarify JDBC settings.
Files/Paths | Change Summary |
---|---|
src/.../CustomDispatcherServlet.java |
Updated Hibernate dialect setting method to use org.hibernate.dialect.MySQL5Dialect directly. |
src/.../META-INF/jpa-schema-export.sql |
Removed CASCADE constraints in DROP TABLE statements, altered column types, and adjusted foreign key references. |
src/.../jdbc_PROD.properties , src/.../jdbc_TEST.properties |
Updated comments to clarify that JDBC settings are fetched from the Jetty context file. |
N/A
Objective | Addressed | Explanation |
---|---|---|
Set correct Hibernate database dialect for exporting the JPA schema (#1696) | ✅ |
src/main/java/ai/elimu/web/servlet/CustomDispatcherServlet.java (1)
`74-74`: **Ensure the Hibernate dialect matches the production database settings.** The explicit setting of the Hibernate dialect to `org.hibernate.dialect.MySQL5Dialect` replaces the previous dynamic retrieval from properties. Verify that this change aligns with the production database configuration and doesn't introduce any discrepancies.src/main/resources/META-INF/jpa-schema-export.sql (5)
`2-20`: **Verify the removal of the `CASCADE` constraint from `drop table` statements.** The `CASCADE` constraint has been removed from the `drop table` statements. Ensure this change is intentional and won't affect the deletion of dependent objects. --- `121-127`: **Ensure correctness of column types and constraints in `Application` table.** Review the changes to the `Application` table, including column types and constraints, to ensure they are correct and maintain schema integrity. --- `132-137`: **Ensure correctness of column types and constraints in `Application_literacySkills` table.** Review the changes to the `Application_literacySkills` table, including column types and constraints, to ensure they are correct and maintain schema integrity. --- `140-154`: **Ensure correctness of column types and constraints in `ApplicationVersion` table.** Review the changes to the `ApplicationVersion` table, including column types and constraints, to ensure they are correct and maintain schema integrity. --- `716-736`: **Ensure correctness of foreign key constraints in `Application` and related tables.** Review the changes to foreign key constraints in the `Application`, `Application_literacySkills`, `Application_numeracySkills`, and `ApplicationVersion` tables to ensure they are correct and maintain referential integrity.
Attention: Patch coverage is 0%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 15.03%. Comparing base (
16d5f22
) to head (7dcd512
).
Files | Patch % | Lines |
---|---|---|
.../ai/elimu/web/servlet/CustomDispatcherServlet.java | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
closes #1696