comocheng / kineticmodelssite

a django site for kinetic models
4 stars 9 forks source link

Implement Semi-Structured Schema for Kinetic Data #159

Closed kiancm closed 3 years ago

kiancm commented 3 years ago

This change replaces the messy multi-table inheritance representation of the kinetic forms with a semi-structured JSON field stored natively in the postgres database. Using pydantic, object serialization is available for each kinetic form along with validation for creation and updates. Django also support querying all the way through the JSON structure of the field.

needs rebasing

kiancm commented 3 years ago

To Do:

kiancm commented 3 years ago

On moving shared properties into the JSON field:

I think the second point outweighs the first, so the common fields (min_temp,max_temp, etc.) will remain as fields in the kinetics table as opposed to in the JSON field.