toMap method

Map<String, dynamic> toMap()

Converts this column info to a map representation.

Implementation

Map<String, dynamic> toMap() {
  return {
    'name': name,
    'type': type,
    'isNullable': isNullable,
    'primaryKey': primaryKey,
    'autoIncrement': autoIncrement,
    if (defaultValue != null) 'defaultValue': defaultValue,
    if (foreignKey != null) 'foreignKey': foreignKey!.toMap(),
  };
}