projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
5276: Merge branch 'master' into 5276-job-graph-phantom-tooltip
[arvados.git]
/
services
/
api
/
db
/
migrate
/
20141208174553_descriptions_are_strings.rb
diff --git
a/services/api/db/migrate/20141208174553_descriptions_are_strings.rb
b/services/api/db/migrate/20141208174553_descriptions_are_strings.rb
index b33a49a4463119b00e79d4548c0d3f6b5878625d..412b427c72e03a0d8ffb9063b6c9284ee33c13cf 100644
(file)
--- a/
services/api/db/migrate/20141208174553_descriptions_are_strings.rb
+++ b/
services/api/db/migrate/20141208174553_descriptions_are_strings.rb
@@
-5,13
+5,15
@@
class DescriptionsAreStrings < ActiveRecord::Migration
def up
tables_with_description_column.each do |table|
def up
tables_with_description_column.each do |table|
- change_column table.to_sym, :description, :string, :limit =>
10000
+ change_column table.to_sym, :description, :string, :limit =>
2**19
end
end
def down
tables_with_description_column.each do |table|
end
end
def down
tables_with_description_column.each do |table|
- if table != 'collections'
+ if table == 'collections'
+ change_column table.to_sym, :description, :string # implicit limit 255
+ else
change_column table.to_sym, :description, :text
end
end
change_column table.to_sym, :description, :text
end
end