project
project copied to clipboard
Central Ledger Migration / Seeds implementation should not depend on the auto_increment config of mysql
Goal:
As a
<stakeholder|persona>
I want to
seed the database tables with fixed Enum integer values instead of depending on the auto increment of mysql
so that
I can deploy mysql with any auto_increment value which will be needed incase of active-active replica and cluster deployments
Problem: The seeding mechanism in the central ledger is poorly implemented and highly depends on the auto increment config of mysql.
For example in this file there are no fixed values specified for settlementGranularityTypes. and it is expecting that two records will be created with GROSS with id value '1' and NET with id value as '2'. But if the auto increment is set to 3 instead of 1, then record 'NET' will be created with the id values as '4'. So it will not match with the Enum mappings here
Acceptance Criteria:
- [ ] All the seeds in the following databases uses fixed integer values from Enum mappings
- [ ] central_ledger
- [ ] quoting_service
- [ ] account_lookup
- [ ] All the needed tables are altered (Remove auto increment from ID field)
- [ ] central_ledger
- [ ] quoting_service
- [ ] account_lookup
- [ ] Release versions for the modified services
- [ ] Update helm chart with the new versions
- [ ] Auto increment config in the mysql (
auto_increment_increment
&auto_increment_offset
) should not affect the GP
Complexity: <High|Medium|Low> > A short comment to remind the reason for the rating
Uncertainty: <High|Medium|Low> > A short comment to remind the reason for the rating
Tasks:
- [ ] TBD [ @? ]
Done
- [ ] Acceptance Criteria pass
- [ ] Designs are up-to date
- [ ] Unit Tests pass
- [ ] Integration Tests pass
- [ ] Code Style & Coverage meets standards
- [ ] Changes made to config (default.json) are broadcast to team and follow-up tasks added to update helm charts and other deployment config.
- [ ] TBD
Pull Requests:
- [ ] TBD
Follow-up:
- N/A
Dependencies:
- N/A
Accountability:
- Owner: TBC
- QA/Review: TBC