Fix #4334: db:migrate hangs.

Possible fix for #4334. Running fix scripts inside migrations is bad practice.
This commit is contained in:
evazion
2020-03-18 03:32:40 -05:00
parent ef43b276b3
commit 96085f17dd

View File

@@ -2,8 +2,5 @@ class AddNameToPoolVersions < ActiveRecord::Migration[4.2]
def change
execute("set statement_timeout = 0")
add_column :pool_versions, :name, :string
PoolVersion.find_each do |pool_version|
pool_version.update_column(:name, pool_version.pool.name)
end
end
end