AlterTable.fromMap constructor
Creates an AlterTable from a map representation.
Implementation
factory AlterTable.fromMap(Map<String, dynamic> map) {
return AlterTable(
oldTable: TableInfo.fromMap(map['oldTable'] as Map<String, dynamic>),
newTable: TableInfo.fromMap(map['newTable'] as Map<String, dynamic>),
renamedColumns: Map<String, String>.from(
map['renamedColumns'] as Map<String, dynamic>? ?? {},
),
oldIndexes: _indexes(map['oldIndexes']),
newIndexes: _indexes(map['newIndexes']),
referencedBy: (map['referencedBy'] as List<dynamic>? ?? [])
.map((r) => ReferencedBy.fromMap(r as Map<String, dynamic>))
.toList(),
);
}