Open peterdudfield opened 1 month ago
I can take a look at this
How will the history table be used?
I ask because an alternative approach would be to use triggers to store the old record in a JSONB
column in a history table every time the sites
table is updated. This has the advantage of being easier to migrate over time as it doesn't use such a rigid schema. However that schema might be required if we want to query the data.
Do you think this approach would be sufficient?
Hey,
Yea idea with the json column. Thats definitely something we could do.
We will likely not query it that much, apart from looking at the history of one site. And see the 5 to 10 updates its had. I dont think it'll be thousands. I like the idea, means if the site table schema changes, then we would not have to worry about destroying the history table.
So perhaps the columns would be
@peterdudfield added an initial preparatory PR.
Detailed Description
It would be good to store the history of site changes.
Context
Possible Implementation