Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-3883 Add "undo edit" option
  3. MBS-8599

Change entity data and edit data to use the same format



    • Type: Sub-task
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Schema Change
    • Labels:


      The first step towards versioning and allowing reverting of edits is to store data attached to entities and entity data attached to edits in the same format.

      From what I understand, edits store data in JSON format, while entities store data in multiple fields. Therefore, there are three options for achieving the same format:

      1. Move data stored in the entity table to JSON format, stored in a separate entity data table, splitting out fields used for queries into separate tables (with an entity_data_id FK), to allow these to still be queryable.

      2. Get rid of JSON, and store all data as fields in an entity data table per entity. This can cause a lot of cruft to be left behind after a schema change - if, for example, a field is deleted, this field must remain on the entity data table to allow reverting and history display.

      3. Split all field types out into separate tables, allowing linking to the entity via an edit or entity data table. This allows flexibility in the schema, because there isn't really a fixed schema. However, queries will be very complex.




            • Assignee:
              lordsputnik Ben Ockmore
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created:


                Version Package