1 class RemoveKindColumns < ActiveRecord::Migration
2 include CurrentApiClient
5 remove_column :links, :head_kind
6 remove_column :links, :tail_kind
7 remove_column :logs, :object_kind
11 add_column :links, :head_kind, :string
12 add_column :links, :tail_kind, :string
13 add_column :logs, :object_kind, :string
17 l.head_kind = ArvadosModel::resource_class_for_uuid(l.head_uuid).kind if l.head_uuid
18 l.tail_kind = ArvadosModel::resource_class_for_uuid(l.tail_uuid).kind if l.tail_uuid
22 l.object_kind = ArvadosModel::resource_class_for_uuid(l.object_uuid).kind if l.object_uuid