Commit 67e00984 by liangyuzhe

调整日期

parent df7bb131
...@@ -4,7 +4,7 @@ namespace :data_migrations do ...@@ -4,7 +4,7 @@ namespace :data_migrations do
desc "batch delete notification_statistics data" desc "batch delete notification_statistics data"
task :v1_batch_delete_notification_statistics_data => :environment do task :v1_batch_delete_notification_statistics_data => :environment do
first_id = NotificationStatistic.first.id first_id = NotificationStatistic.first.id
last_object = NotificationStatistic.where("notification_statistics.created_at < ?", '2020-04-30 16:00:00').last last_object = NotificationStatistic.where("notification_statistics.created_at < ?", '2020-05-30 16:00:00').last
first_id.step(last_object.id, 10000) do |i| first_id.step(last_object.id, 10000) do |i|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment