toDefinition method

  1. @protected
  2. @override
Map<String, Object> toDefinition()
override

Returns a JSON that changes when SchemeElement properties change.

A class derived from SchemeElement provides a description of a certain aspect of a Scheme. As an application evolves, the Scheme it uses may need to change to meet application requirements. The return value of this method reflects changes to the description provided by a derived class. It is used by this library to automatically trigger scheme migrations.

Implementation

@protected
@override
Map<String, Object> toDefinition() => {
  name: [
    _definitionFormat,
    version,
    [
      for (var column in columns) ////
        [column.name, column.ascending],
    ],
  ],
};