You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
373 B
12 lines
373 B
5 years ago
|
class DeleteErrorMyshixunFromMyshxiuns < ActiveRecord::Migration[5.2]
|
||
|
def change
|
||
|
myshixuns = Myshixun.where("created_at > '2019-07-26 00:00:00' and repo_name is null")
|
||
|
myshixuns.find_each do |myshixun|
|
||
|
if myshixun.games.blank?
|
||
|
puts("###########user_login: #{User.find(myshixun.user_id).login}")
|
||
|
myshixun.destroy!
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|