1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class AddFileInfoToCollection < ActiveRecord::Migration[4.2]
7 add_column :collections, :file_count, :integer, default: 0, null: false
8 add_column :collections, :file_size_total, :integer, limit: 8, default: 0, null: false
10 puts "Collections now have two new columns, file_count and file_size_total."
11 puts "They were initialized with a zero value. If you are upgrading an Arvados"
12 puts "installation, please run the populate-file-info-columns-in-collections.rb"
13 puts "script to populate the columns. If this is a new installation, that is not"
18 remove_column :collections, :file_count
19 remove_column :collections, :file_size_total