Merge branch 'master' into 14260-runtime-token
[arvados.git] / services / api / db / migrate / 20180913175443_add_version_info_to_collections.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddVersionInfoToCollections < ActiveRecord::Migration
6   def change
7     # Do changes in bulk to save time on huge tables
8     change_table :collections, :bulk => true do |t|
9       t.string :current_version_uuid
10       t.integer :version, null: false, default: 1
11       t.index [:current_version_uuid, :version], unique: true
12     end
13   end
14 end