Skip to content

Store field dependencies in the database and optimize formula fields accordingly

This MR separates the field dependency logic entirely out of the formula module and makes it generic in field.field_dependencies module. It also moves formula and field dependency information into the database.

Testing notes

  • Can migrate a complex database from master and the resulting formula fields are still working and changable
  • Can rename formula fields and very nested dependencies still work
  • Can change values and formula values dependant on those still change
  • Can import/export templates and it works as expected
  • Can trash/perm delete groups, apps, tables etc.
  • Can reference other fields, delete those fields and then rename/create/restore other fields to fix the broken fields

Merge Request Checklist

  • Documentation has been updated
  • Quality Standards are met
  • The UI/UX has been updated following UI Style Guide
  • The redoc API pages have been updated for any REST API changes
  • The per database user API docs page has been updated for any REST API changes made to endpoints which can be accessed via a user created token
  • Has performance been considered and tested when appropriate? Ideally Baserow should be performant when working with hundreds of thousands of rows
  • New/Changed Premium features are separated correctly in the premium folder
  • There are tests for and it has been checked that any changed/new django ORM code is sensible, doesn't perform N queries and that table models are not generated needlessly or generated with all columns when only a few are needed.

Closes #639 (closed)

Edited by Nigel Gott

Merge request reports