Files
SpacetimeDB/test
Kim Altintop 9bb2b21507 core: Remove index update when updating a database (#686)
The `TableDef` type is nominally the same for the database schema and
the schema description from a module, but only the former contains
information about indexes and sequences. This would cause all indexes to
be dropped when updating a database, because none of the existing
indexes would ever be present in the module's schema definition.

It is unclear if the functionality could be recovered, but it does not
seem to be robust without a dedicated schema manipulation language
either way.

We still want to allow module updates which do not change the schema at
all, or only introduce new tables, as otherwise users may be forced to
re-run expensive initialisation steps even though they only introduced
debugging code or somesuch.

To make this work, a somewhat dubious equivalence comparison is made,
comparing the constraint definitions in a way deemed correct in post-hoc
analysis.
2023-12-21 08:13:02 +00:00
..