Removed javascript SQL caching table for indexing#905
Removed javascript SQL caching table for indexing#905LiamStanziani wants to merge 5 commits intomaintenancefrom
Conversation
…hat functionality to remove references
…exing in related tables (serviceSpecialists junction table, and consultationServices/professionalSpecialists tables). Added in cleanup for removed javascript table, and removed table from oscarinit.sql and development.sql
…eation, just incase the indexes already exist (to avoid errors overall when running)
Reviewer's GuideReplaces the legacy specialistsJavascript pre-generated JS table and related Java code with direct use of the existing consultation tables optimized via new indexes, and adds a repeatable DB migration to apply these schema changes while keeping data intact. Entity relationship diagram for updated consultation specialist tableserDiagram
consultationServices {
int serviceId PK
varchar serviceDesc
char active
index idx_consultationServices_active_desc
}
professionalSpecialists {
int specId PK
varchar lName
varchar fName
varchar referralNo
varchar specType
int institutionId
int departmentId
varchar province
tinyint hideFromView
tinyint deleted
int eformId
index idx_professionalSpecialists_name
index idx_professionalSpecialists_referralNo
index idx_professionalSpecialists_specType
index idx_professionalSpecialists_institution
index idx_professionalSpecialists_department
}
serviceSpecialists {
int serviceId FK
int specId FK
index idx_serviceSpecialists_serviceId
index idx_serviceSpecialists_specId
}
specialistsJavascript {
int id PK
char setId
text javascriptString
}
consultationServices ||--o{ serviceSpecialists : has
professionalSpecialists ||--o{ serviceSpecialists : linked_by
Class diagram for removal of SpecialistsJavascript caching layerclassDiagram
class SpecialistsJavascript {
int id
char setId
text javascriptString
}
class SpecialistsJavascriptDao
class SpecialistsJavascriptDaoImpl
class EctConConstructSpecialistsScriptsFile
SpecialistsJavascriptDaoImpl ..|> SpecialistsJavascriptDao
EctConConstructSpecialistsScriptsFile ..> SpecialistsJavascriptDao
EctConConstructSpecialistsScriptsFile ..> SpecialistsJavascript
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Removed: From the title as this isn't included into this draft PR yet |
|
To generate Unit Tests for this PR, please click here. |
…tor-javascript-sql-table
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can generate a title for your PR based on the changes with custom instructions.Set the |
In this PR, I have:
General overview of the changes
The "specialistJavascript" table is only used for caching the related consultation/specialist data as javascript for faster access when running the consultation functionality.
In terms of migration, the only changes needed for this is to remove all of the usage of this table (and connected functionality).
No actual logic updates are needed in the java files past removal of the javascript caching (since the table itself doesn't go and modify data in the actual consultation related tables, it is isolated to make changes to the "specialistJavascript" table itself).
PLEASE NOTE THAT:
This PR is a work in progress, as explained in the title, I would like to include updated consultant test data (which I'm pretty sure Yingbull has the data), and also test afterwards with the related functionality to ensure that the systems are functioning correctly and the speed of the related functionality is not hindered.
Not sure when this branch will be updated to include the new consultant test data/testing it. But this current version can be kept in draft until ready for visibility.