Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
commit
cde1d11871
@ -0,0 +1,17 @@
|
|||||||
|
class DeleteNullAtMessages < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
count = AtMessage.all.count / 30 + 2
|
||||||
|
transaction do
|
||||||
|
for i in 1 ... count do i
|
||||||
|
AtMessage.page(i).per(30).each do |am|
|
||||||
|
if am.at_message.nil?
|
||||||
|
am.destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue