fromJson static method

Implementation

static DatabaseMigrationWarningType fromJson(String name) {
  switch (name) {
    case 'tableDropped':
      return DatabaseMigrationWarningType.tableDropped;
    case 'columnDropped':
      return DatabaseMigrationWarningType.columnDropped;
    case 'notNullAdded':
      return DatabaseMigrationWarningType.notNullAdded;
    case 'uniqueIndexCreated':
      return DatabaseMigrationWarningType.uniqueIndexCreated;
    default:
      throw ArgumentError(
          'Value "$name" cannot be converted to "DatabaseMigrationWarningType"');
  }
}