TableMigration.fromJson constructor
TableMigration.fromJson(
- Map<String, dynamic> jsonSerialization
)
Implementation
factory TableMigration.fromJson(Map<String, dynamic> jsonSerialization) {
return TableMigration(
name: jsonSerialization['name'] as String,
dartName: jsonSerialization['dartName'] as String?,
module: jsonSerialization['module'] as String?,
schema: jsonSerialization['schema'] as String,
addColumns: (jsonSerialization['addColumns'] as List)
.map(
(e) => _i2.ColumnDefinition.fromJson((e as Map<String, dynamic>)))
.toList(),
deleteColumns: (jsonSerialization['deleteColumns'] as List)
.map((e) => e as String)
.toList(),
modifyColumns: (jsonSerialization['modifyColumns'] as List)
.map((e) => _i3.ColumnMigration.fromJson((e as Map<String, dynamic>)))
.toList(),
addIndexes: (jsonSerialization['addIndexes'] as List)
.map((e) => _i4.IndexDefinition.fromJson((e as Map<String, dynamic>)))
.toList(),
deleteIndexes: (jsonSerialization['deleteIndexes'] as List)
.map((e) => e as String)
.toList(),
addForeignKeys: (jsonSerialization['addForeignKeys'] as List)
.map((e) =>
_i5.ForeignKeyDefinition.fromJson((e as Map<String, dynamic>)))
.toList(),
deleteForeignKeys: (jsonSerialization['deleteForeignKeys'] as List)
.map((e) => e as String)
.toList(),
warnings: (jsonSerialization['warnings'] as List)
.map((e) => _i6.DatabaseMigrationWarning.fromJson(
(e as Map<String, dynamic>)))
.toList(),
);
}