Engine

2.6. Changing a schema🔗

A schema only grows: a deploy that changes the event types is rejected unless every stored event stays valid. These changes to the folio's ChargePosted, on a store with a FolioOpened and a charge:

      ChargePosted: { charge_id: text, gross_minor: number, note: text?, tip: number? }
folioWithTipText · checked against the spec ·

A deploy that adds an optional field is accepted.

      ChargePosted: { charge_id: text, gross_minor: number, note: text?, tax: number }
folioWithTaxText · checked against the spec ·

A deploy that adds a required field is rejected.

      ChargePosted: { charge_id: text, gross_minor: number?, note: text? }
folioWithOptionalAmountText · checked against the spec ·

A deploy that makes a required field optional is accepted.

      ChargePosted: { charge_id: text, gross_minor: number, note: text }
folioWithRequiredNoteText · checked against the spec ·

A deploy that makes an optional field required is rejected.

      ChargePosted: { charge_id: text, gross_minor: text, note: text? }
folioWithTextAmountText · checked against the spec ·

A deploy that changes the type of a field is rejected.

      ChargePosted: { gross_minor: number, note: text? }
folioWithoutChargeIdText · checked against the spec ·

A deploy that removes a field is rejected.

Removing the whole type ChargePosted is accepted while no charge is stored, and rejected once one is (A deploy that removes a type without events is accepted. , A deploy that removes a type with events is rejected. ):

      FolioOpened:  { reservation_id: text, currency: text }
      FolioClosed:  {}

The general claims: