Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace mod_log columns with a table
https://eaflood.atlassian.net/browse/WATER-4563 https://eaflood.atlassian.net/browse/WATER-4564 https://eaflood.atlassian.net/browse/WATER-4565 > Part of the work to display a licence's history to users (mod log) **It's a trap!** We have fallen into making the same mistake as the previous team. When we believed that a version (charge, licence or return) had a one-to-one relationship with NALD mod log records a JSONB field in each was a suitable solution to capturing just the information we need. It's only the historic records we have to worry about after all. But when we learned that a version record could be linked to multiple mod logs we should have taken a different approach. Instead, we ploughed on with our JSON column column [altering its name and default](#2612) to match. 🤦😬 Once you've started down the JSONB road, it is easy to get trapped! Thankfully, we've come to our senses before this saw the light of day in production. The mod log data we are importing needs to go into its own table and we link our version records accordingly. A 'standard' relationship database solution. This change drops the columns and adds a new table instead.
- Loading branch information