Change post_appeals.creator_ip_addr from integer to inet.

The existing values are garbage, rails stored e.g. "87.126.98.245" as
"87.126.98.245".to_i => 87. The column is nulled to indicate these IPs
are unknown.
This commit is contained in:
evazion
2017-01-12 07:17:11 +00:00
parent 3ca638bc92
commit 26c193dfb3
3 changed files with 16 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ module Moderator
add_row(sums, WikiPageVersion.where(updater: users).group(:updater_ip_addr).count)
add_row(sums, Comment.where(creator: users).group(:ip_addr).count)
add_row(sums, Dmail.where(from: users).group(:creator_ip_addr).count)
add_row(sums, PostAppeal.where(creator: users).group(:creator_ip_addr).count)
add_row(sums, PostAppeal.where(creator: users).where.not(creator_ip_addr: nil).group(:creator_ip_addr).count)
add_row(sums, PostFlag.where(creator: users).group(:creator_ip_addr).count)
add_row(sums, Upload.where(uploader: users).group(:uploader_ip_addr).count)
add_row(sums, User.where(id: users).group(:last_ip_addr).count)