Files
gristlabs_grist-core/app/common
Alex Hall b8486dcdba (core) Nice summary table IDs
Summary:
Changes auto-generated summary table IDs from e.g. `GristSummary_6_Table1` to `Table1_summary_A_B` (meaning `Table1` grouped by `A` and `B`). This makes it easier to write formulas involving summary tables, make API requests, understand logs, etc.

Because these don't encode the source table ID as reliably as before, `decode_summary_table_name` now uses the summary table schema info, not just the summary table ID. Specifically, it looks at the type of the `group` column, which is `RefList:<source table id>`.

Renaming a source table renames the summary table as before, and now renaming a groupby column renames the summary table as well.

Conflicting table names are resolved in the usual way by adding a number at the end, e.g. `Table1_summary_A_B2`. These summary tables are not automatically renamed when the disambiguation is no longer needed.

A new migration renames all summary tables to the new scheme, and updates formulas using summary tables with a simple regex.

Test Plan:
Updated many tests to use the new style of name.

Added new Python tests to for resolving conflicts when renaming source tables and groupby columns.

Added a test for the migration, including renames in formulas.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3508
2022-07-14 12:09:56 +02:00
..
2022-06-17 21:53:20 +02:00
2022-02-19 09:46:49 +00:00
2021-09-16 10:06:04 -04:00
2020-07-21 20:39:10 -04:00
2020-07-21 20:39:10 -04:00
2022-06-29 18:28:37 +02:00
2022-02-19 09:46:49 +00:00
2022-01-13 11:10:17 +01:00
2020-07-21 20:39:10 -04:00
2022-07-04 10:42:40 -04:00
2022-05-09 21:44:57 +02:00
2020-07-21 20:39:10 -04:00
2022-06-29 18:28:37 +02:00
2020-07-21 20:39:10 -04:00
2022-06-27 16:10:10 -04:00
2022-07-04 10:42:40 -04:00
2020-07-21 20:39:10 -04:00
2022-04-27 22:21:55 +02:00
2022-07-04 10:42:40 -04:00
2020-07-21 20:39:10 -04:00
2022-02-19 09:46:49 +00:00
2022-06-29 18:28:37 +02:00
2022-07-14 12:09:56 +02:00
2020-07-21 20:39:10 -04:00
2022-02-19 09:46:49 +00:00
2022-03-12 14:34:46 -08:00
2020-07-21 20:39:10 -04:00
2020-07-23 16:21:08 -04:00
2020-07-21 20:39:10 -04:00
2020-09-29 18:57:56 -04:00
2022-07-04 10:42:40 -04:00
2021-07-20 15:17:03 +02:00