111297422-migration_fix

This commit is contained in:
Stas 2016-01-11 11:05:01 +02:00
parent 4a0b1fea39
commit 1370a5f0fe

View file

@ -2,12 +2,6 @@ class NameAndPasswordForBlockedDomain < ActiveRecord::Migration
def up
add_column :blocked_domains, :name, :string
add_index :blocked_domains, :name
BlockedDomain.find_each do |x, domain|
names = domain.names
domain.update_columns(name: names[x])
end
remove_column :blocked_domains, :names
end