DatabaseMigrationAction.fromJson constructor

DatabaseMigrationAction.fromJson(
  1. Map<String, dynamic> jsonSerialization
)

Implementation

factory DatabaseMigrationAction.fromJson(
    Map<String, dynamic> jsonSerialization) {
  return DatabaseMigrationAction(
    type: _i2.DatabaseMigrationActionType.fromJson(
        (jsonSerialization['type'] as String)),
    deleteTable: jsonSerialization['deleteTable'] as String?,
    alterTable: jsonSerialization['alterTable'] == null
        ? null
        : _i2.TableMigration.fromJson(
            (jsonSerialization['alterTable'] as Map<String, dynamic>)),
    createTable: jsonSerialization['createTable'] == null
        ? null
        : _i2.TableDefinition.fromJson(
            (jsonSerialization['createTable'] as Map<String, dynamic>)),
  );
}