mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
Fix data migration #2732
This commit is contained in:
parent
6256d4abee
commit
7139a0c9ed
1 changed files with 4 additions and 4 deletions
|
@ -1,11 +1,11 @@
|
|||
class RefactorDomainStatuses < ActiveRecord::Migration
|
||||
def self.up
|
||||
Domain.all.each do |x|
|
||||
x.statuses = []
|
||||
Domain.find_each do |x|
|
||||
statuses = []
|
||||
x.domain_statuses.each do |ds|
|
||||
x.statuses << ds.value
|
||||
statuses << ds.value
|
||||
end
|
||||
x.save
|
||||
x.update_column('statuses', statuses)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue