1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class RenameCreatedByToOwner < ActiveRecord::Migration[4.2]
7 %w{api_clients collections logs metadata nodes pipelines pipeline_invocations projects specimens users}
12 remove_column t.to_sym, :created_by_client
13 rename_column t.to_sym, :created_by_user, :owner
18 tables.reverse.each do |t|
19 rename_column t.to_sym, :owner, :created_by_user
20 add_column t.to_sym, :created_by_client, :string