Skip to content

Commit

Permalink
Merge pull request #179 from carbonin/sort_tables_before_removing_limits
Browse files Browse the repository at this point in the history
Remove the limits from the tables in sorted order
  • Loading branch information
Fryguy authored Mar 16, 2018
2 parents ec30ed8 + d5413fd commit 565c01f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/migrate/20171109225052_remove_string_column_limits.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class RemoveStringColumnLimits < ActiveRecord::Migration[5.0]
def up
connection.tables.each do |t|
connection.tables.sort.each do |t|
connection.columns(t).each do |col|
next unless col.type == :string && !col.limit.nil?
change_column t, col.name, :string, :limit => nil
Expand Down

0 comments on commit 565c01f

Please sign in to comment.