models: stop saving IP addresses in version tables.

Mark various `creator_ip_addr` and `updater_ip_addr` columns as ignored
and stop updating them in preparation for dropping them.
This commit is contained in:
evazion
2022-09-18 03:02:30 -05:00
parent 44d4452068
commit d4da8499ce
28 changed files with 60 additions and 50 deletions

View File

@@ -1,6 +1,8 @@
# frozen_string_literal: true
class PoolVersion < ApplicationRecord
self.ignored_columns = [:updater_ip_addr]
belongs_to :updater, :class_name => "User"
belongs_to :pool
@@ -64,7 +66,7 @@ class PoolVersion < ApplicationRecord
SqsService.new(Danbooru.config.aws_sqs_archives_url)
end
def self.queue(pool, updater, updater_ip_addr)
def self.queue(pool, updater)
# queue updates to sqs so that if archives goes down for whatever reason it won't
# block pool updates
raise NotImplementedError, "Archive service is not configured." if !enabled?
@@ -73,7 +75,6 @@ class PoolVersion < ApplicationRecord
pool_id: pool.id,
post_ids: pool.post_ids,
updater_id: updater.id,
updater_ip_addr: updater_ip_addr.to_s,
created_at: pool.created_at.try(:iso8601),
updated_at: pool.updated_at.try(:iso8601),
description: pool.description,