Coping with deprecated columns in Data Explorer

One infrequent but annoying problem is Data Explorer queries can start breaking when columns are dropped and renamed in core or plugins. Downstream this can cause automations to start failing.

To that end, I have opened one PR here, which will mark columns as deprecated in the Data Explorer schema explorer (heh):

This is small comfort which will mostly help when creating new queries, but it is likely the most we can do without introducing a SQL parser as a dependency into core.

However I’m keen on expanding this to also:

  1. display a warning on queries that are using deprecated columns, and
  2. add a problem check that can surface these issues in the admin notices section of the dashboard.

The second one would be the ultimate way of giving admins a heads up before being taken by surprise when upgrading.

Would you be okay with introducing a gem to do SQL parsing to support this feature @sam? It could be required only when Data Explorer is loaded.

4 Likes

Hi Ted :hugs:

Honestly, I am not sure, everything depends. The good news is that Nat and @tgxworld are looking at data explorer at the moment so they should be able to provide guidance.

3 Likes

I’m mostly OK with the idea here but I don’t think everyone is religiously deprecating columns that is a prerequisite for this feature to be useful. Not sure but can we determine if a column is considered deprecated based on whether the column has been marked as readonly in the database? That is a much more reliable signal as to whether a column is going to be deprecated or not IMO.

2 Likes