🚑
parent
3702ee87ef
commit
3b1ce9828c
|
@ -43,7 +43,7 @@ class Device < ApplicationRecord
|
|||
logs
|
||||
.order(created_at: :desc)
|
||||
.offset((max_log_count || DEFAULT_MAX_LOGS) * multiplier)
|
||||
.delete_all
|
||||
.destroy_all
|
||||
end
|
||||
|
||||
def self.current
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class MigrateAwayFromMetaColumn < ActiveRecord::Migration[5.1]
|
||||
def up
|
||||
Device.all.map do |d|
|
||||
d.trim_log_list!(5)
|
||||
d.trim_log_list!(2)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue