1. How to cdm (Conceptual Data Model) update¶
This documentation is the procedure every developer needs to follow when they ask for an update of the database's schema or CDM.
The different steps needs to be done in the following order:
1.1 Developer actions¶
1.1.1 Update of the Excel file¶
Applicable only if an update of data model has been identified
Prerequisites
A Product Responsible must have validated the CDM modification request before the developer can update the Excel file.
The first thing to do is to update the Suivi Modifications MCDS Aero-Webb Excel file located in:
- GitLab: Suivi Modifications MCDs Aero-Webb.xls
- WSL: "/home/userName/Workspaces/Aero-Webb/Backend/aero-webb-services/Database/Conception/Suivi Modifications MCDs Aero-Webb.xls"
Note
Make sure to get the last version updated present in the develop branch.
In this file you need to fill a few columns with information concerning your request.
These information needs to be added in chronological order.
That means after the last request with a date and before the STANDBY in the Prise and compte et livraison and the ones with an orange background
Here are the different information:
- The schema receiving the changes.
- The name of the new table or the table receiving changes.
- If it is a new table add a X in the corresponding column.
- The date of the request.
- The type of the target (std or optimal).
- The field or association added/changed.
Info
Use one line per field/association.
- Indicate if the field or association is a primary key with an X in the corresponding column.
- The type of the field in PostgreSQL.
- Indicate if it is an adding, a delete or a modification.
- Do not touch the Prise en compte et livraison column.
- The reason of your request and if possible the mantis linked.
1.1.2 First merge request by the developer¶
Next, the developer pushes an MR that will contain:
- The Excel file updated.
This MR will have a double validation by the TD (Technical direction) and FD (Functional direction). If validated, it will be taken by the TD.
1.2 Technical direction actions¶
1.2.1 Update of the CDM and linked scripts¶
Once the Excel is modified, the technical direction will take into account the request for the changes in the database.
The TD will update the CDM, generate the database script, create an upgrade script, update the Excel and create a merge request with these modifications.
1.2.2 First merge request by the technical direction¶
This MR will be taken by the TD and have the following content:
- The cdm and MPD modifications.
- The CREBAS updated.
- The upgrade script :
upgrade_AW_PostgreSQL.sql. - The Excel updated with the date.
1.2.3 Java and SQL modifications by the technical direction¶
When the MR is taken, the TD update the 90_01_update_upgrade_AW7_Postgres.sql file with the created upgrade script and possibly the complementary script made by the developer.
Then, the TD will update the model classes located in the domain/model package, the Helper linked to these classes and will fix the potential compilation problems.
Note
See History table creation for specific case of the history tables.
Once the model classes are updated, it's time to launch the generators:
1.2.4 Second merge request by the technical direction¶
This MR will be taken by the TD and have the following content:
- The generated or modified classes.
- The SQL script updated.
1.3 Developer actions¶
1.3.1 Synchronization with develop and new developments¶
The developer needs to resync with develop in order to get the changes induced by the TD's merge request.
Once the developer is synchronized with develop, he needs to execute the 90_01_update_upgrade_AW7_Postgres.sql script on his local database to be in sync with the changes.
Once done, he can start his development.
The packages the developer can change
- The services classes impacted by the changes.
- The DAO which are not generated.
- Etc...
The packages the developer cannot change
- The model classes (domain/model).
- The generated DAO (/gen).
- The mapping classes.
1.3.2 Second merge request by the developer¶
This MR will be taken by the TD and have the following content:
- The modifications and developments made by the developer in the previous step.
Created: 2024-02-13