gristlabs_grist-core/sandbox
Dmitry S 14cdd47675 (core) When checking for metadata consistency, check for stray column records too
Summary:
Currently, an undo of a non-last action can leave the doc in an inconsistent
state. For example, it may remove a table, but fail to remove all columns of
it from metadata. We normally check that schema corresponds to metadata, but
stray columns were not visible to this check, and instead caused later table
additions to fail.

This diff fixes the check to fail the action that causes stray columns, and
to restore the doc to a consistent state.

Note that this only handles schema-metadata inconsistencies, but an undo of a
non-last action can easily create other surprises.

Test Plan: Added a test case that triggered inconsistency before, and now triggers a failed undo.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2715
2021-01-27 18:10:11 -05:00
..
grist (core) When checking for metadata consistency, check for stray column records too 2021-01-27 18:10:11 -05:00
gen_js_schema.py (core) move data engine code to core 2020-07-29 08:57:25 -04:00
install_tz.js (core) move data engine code to core 2020-07-29 08:57:25 -04:00
requirements.txt (core) move data engine code to core 2020-07-29 08:57:25 -04:00