db: drop unused columns from users table.

Note that the password_hash column was replaced by bcrypt_password_hash
in 2013, but the old password_hash column was never dropped.
This commit is contained in:
evazion
2019-11-16 19:34:30 -06:00
parent 90713ef94c
commit 364ecfe68f
6 changed files with 13 additions and 11 deletions

View File

@@ -32,7 +32,6 @@ private
user.email = nil
user.last_logged_in_at = nil
user.last_forum_read_at = nil
user.recent_tags = ''
user.favorite_tags = ''
user.blacklisted_tags = ''
user.hide_deleted_posts = false

View File

@@ -167,7 +167,6 @@ class User < ApplicationRecord
end
def encrypt_password_on_create
self.password_hash = ""
self.bcrypt_password_hash = User.bcrypt(password)
end
@@ -581,7 +580,7 @@ class User < ApplicationRecord
attributes += BOOLEAN_ATTRIBUTES
attributes += [
:updated_at, :email, :last_logged_in_at, :last_forum_read_at,
:recent_tags, :comment_threshold, :default_image_size,
:comment_threshold, :default_image_size,
:favorite_tags, :blacklisted_tags, :time_zone, :per_page,
:custom_style, :favorite_count, :api_regen_multiplier,
:api_burst_limit, :remaining_api_limit, :statement_timeout,