Verifies that a data-carrying enum has its variant fields registered in the app
schema with globally-assigned field indices (indices are unique across all variants).
End-to-end CRUD test for a data-carrying enum (all variants have fields).
Creates records with different variants, reads them back, and verifies roundtrip.
Tests that jiff::Timestamp fields inside data-carrying enum variants round-trip correctly.
Also covers a mixed enum (one unit variant, one data variant) to verify null handling.
Tests that UUID fields inside data-carrying enum variants round-trip correctly.
UUID is a non-trivial primitive that requires type casting on some databases.
Roundtrip test for an enum embedded inside a variant field of another enum (enum-in-enum).
The inner enum is unit-only; the outer has one data variant and one unit variant.
Updating a data-carrying enum between variants with different field counts
round-trips. The narrower variant’s value record is shorter than the wider
variant’s data columns expect, exercising the same out-of-bounds projection
path as #1068 without any unit variant involved.
Verifies that a mixed enum (some unit variants, some data variants) registers
correctly: unit variants have empty fields, data variants have their fields
with indices assigned starting from 0 and continuing globally across variants.
Updating a mixed enum field from a data-carrying variant to a unit variant
(and back) round-trips correctly. Regression test for #1068: the unit
variant’s value record is narrower than the data variant’s data column
expects, which used to panic while lowering the update.