ColumnInfo.fromMap constructor
Creates a ColumnInfo from a map representation.
Implementation
factory ColumnInfo.fromMap(Map<String, dynamic> map) {
return ColumnInfo(
name: map['name'] as String,
type: map['type'] as String,
isNullable: map['isNullable'] as bool,
primaryKey: map['primaryKey'] as bool? ?? false,
autoIncrement: map['autoIncrement'] as bool? ?? false,
defaultValue: map['defaultValue'] as String?,
foreignKey: map['foreignKey'] != null
? ForeignKeyInfo.fromMap(map['foreignKey'] as Map<String, dynamic>)
: null,
);
}