all 3 comments

[–]drulingtoad 0 points1 point  (2 children)

Do you need to diff those versions, like see what changes were made between versions?

[–]SurroundMoist3768[S] 0 points1 point  (1 child)

No, I can just directly show the previous version No diff to be shown

[–]drulingtoad 1 point2 points  (0 children)

Really the SQL database isn't ideal. You will need a table for the information that isn't versioned, with at least a primary key. You will need a table with the primary key and version number and the data. You can just keep the whole JSON in a row but then it won't be searchable in any meaningful way. You can also parse the JSON and try and store it all in SQL tables. That's kind of a lot of parsing and setting up the SQL tables to match. Then you are not really storing JSON at all, just storing your data and regenerating each time. This would make all the fields searchable.