Skip to main content

Function: isWideningType()

function isWideningType(from, to): boolean;

Defined in: packages/core/src/migrate/flatten.ts:175

Is from → to a widening, i.e. can every existing answer be carried across mechanically?

Deliberately narrow. research/12 row 5 lists int→decimal, date→datetime and select_one→text alongside any→text, and ODK Central allows only →text — so anything beyond this table is a judgement call that belongs to the author, not to a silent automatic step. Being wrong in the permissive direction here means a migration quietly mangles data, which is the failure this whole module exists to prevent.

Parameters

ParameterType
fromstring
tostring

Returns

boolean