mirror of
https://ghfast.top/https://github.com/discourse/discourse-akismet.git
synced 2026-07-15 11:36:24 +08:00
14 lines
316 B
Ruby
14 lines
316 B
Ruby
# frozen_string_literal: true
|
|
|
|
class RemoveOldAkismetStates < ActiveRecord::Migration[5.2]
|
|
def up
|
|
DB.exec(<<~SQL, updated_at: 5.minutes.ago
|
|
DELETE FROM post_custom_fields
|
|
WHERE name = 'AKISMET_STATE' AND value = 'needs_review' AND updated_at < :updated_at
|
|
SQL
|
|
)
|
|
end
|
|
|
|
def down
|
|
end
|
|
end
|