Arch Forum 2024-10-03¶
Participants: Backend devs, Magnus, Victor
Agenda¶
- TransactionId hashed guid (Martin)
- DBUp Stored procedure handling (Rasmus)
Notes¶
TransactionId hashed guid (Martin) Martin showcased the way that TransactionId is generated in CashDeposit to be able to have a consistent id for idempotency. Presentation here.
Some questions/comments came up:
1. Do we have a solution for time based hashes (i.e. within the last X time the same hash should be generated to avoid double sends)? No, this hash implementation does not solve that (which looks like an unsolvable problem).
2. Is the bardcode used in CashDeposit TransactionId guid hash unique forever? Yes it is.
3. It is easy to forget to put a full area namespace as input into the platform uuid hash code.
Followup¶
After the meeting Martin, Lars and Victor discussed the 3rd point, and Martin will make a change in the generation code to make both the area and key as explicit arguments to minimize the chance of mistakes.
DBUp Stored procedure handling (Rasmus) Rasmus showcased an update to how we do db migrations. Presentation here. The basic idea is to have a separate folder of script files for stored procedures only, with one .sql file for each SP, which are rerun every time the file in question changes. This way its easy to follow what happens in a PR.
Some questions/comments came up:
1. Overall this is a great improvement.
2. Once fully implemented we need to have a DB migration guideline writeup in wiki.
3. How to best handle migration to the new way of handling SPs?
Followup¶
After the meeting those most interested (Gudmundur, Rasmus Lars and Victor) had a separate discussion around point 3, and we decided that an area migrates all-at-once, meaning all its SPs are moved out from old Migrations script, into new separate scripts in StoredProcedures folder, and then the migration code will block any create/alter/deletes of SPs in the old Migrations folder.