Skip to content

Arch Forum 2025-10-02

Participants: Backend devs, Andy, Kyle, Magnus and Victor

Agenda

  • Too many SQL migration scripts
  • Transactions walkthrough

Summary

Too many SQL migration scripts

Database migrations are handled by scripts stored in the Migration folder. For older areas, there can be a lot of scripts, for example, Transactions has more than 400. It gets a bit unwieldy to scroll through them, and Mesut raised a good question about if something can be done to improve the situation.

A short discussion followed:

  • It would be good if we kept schema changes separate from data changes (DDL vs. DML scripts).
  • As it is now, you can't really see the table structure by looking at the SQL scripts. Instead, what everyone does when they want to check what a table looks like is to run the scripts and look either locally or in stage/prod.
  • Even a long list of 400+ change scripts doesn't affect the time for the 'Deploy DB' step in the PR pipeline. The run time is around 1 second for areas with few scripts, and up to 5 seconds for areas with a lot (400+) of scripts.
  • Mesut's original idea was to add an "Archive" folder where older scripts can be moved. This way, no logic is changed, but the developer has a clearer view. This would require support in the platform code.
  • Another idea would be to squash schema changes, e.g., take a dump of the prod DB schema and replace the history with this. The downside here is that it won't handle data change scripts (i.e., inserts/updates) and would require careful manual work to ensure the result is correct.
  • In general, most developers do not think this is a major issue.

Transactions walkthrough

We went through the (still work-in-progress) Core banking documentation:

Details at:

Several questions, considerations, and improvements were brought up. Victor will update the documentation accordingly.