class ViewModel::Migration

def down(view, _references)

def down(view, _references)
  raise ViewModel::Migration::OneWayError.new(view[ViewModel::TYPE_ATTRIBUTE], :down)
end

def up(view, _references)

def up(view, _references)
  # Only a reference-only view may be (trivially) migrated up without an
  # explicit migration.
  if (view.keys - REFERENCE_ONLY_KEYS).present?
    raise ViewModel::Migration::OneWayError.new(view[ViewModel::TYPE_ATTRIBUTE], :up)
  end
end