mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
15 lines
324 B
Ruby
15 lines
324 B
Ruby
class RefactorDomainStatuses < ActiveRecord::Migration
|
|
def self.up
|
|
Domain.find_each do |x|
|
|
statuses = []
|
|
x.domain_statuses.each do |ds|
|
|
statuses << ds.value
|
|
end
|
|
x.update_column('statuses', statuses)
|
|
end
|
|
end
|
|
|
|
def self.down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|