LogoRobo.js
Framework

analyzeSchemaChanges()

Function: analyzeSchemaChanges()

function analyzeSchemaChanges(
   stored, 
   current, 
   modelName): ChangeAnalysisResult

Analyze schema changes between stored metadata and current schema.

Change classification per spec 13.4:

Safe changes (auto-apply):

  • Add optional field
  • Add field with default
  • Add/remove index
  • Add unique constraint (validates existing data)

Breaking changes (require migration):

  • Add required field without default
  • Remove field
  • Change field type
  • Remove unique constraint (potential data implications)

Parameters

ParameterTypeDescription
storedRecord<string, FieldMetadata>Previously stored field metadata
currentNormalizedSchemaCurrent normalized schema
modelNamestringModel name for change descriptions

Returns

ChangeAnalysisResult

Analysis result with safe and breaking changes

On this page