8784: Fix test for latest firefox.
[arvados.git] / services / api / db / migrate / 20141208174553_descriptions_are_strings.rb
1 class DescriptionsAreStrings < ActiveRecord::Migration
2   def tables_with_description_column
3     %w{collections groups jobs pipeline_instances pipeline_templates}
4   end
5
6   def up
7     tables_with_description_column.each do |table|
8       change_column table.to_sym, :description, :string, :limit => 2**19
9     end
10   end
11
12   def down
13     tables_with_description_column.each do |table|
14       if table == 'collections'
15         change_column table.to_sym, :description, :string # implicit limit 255
16       else
17         change_column table.to_sym, :description, :text
18       end
19     end
20   end
21 end