Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class User < ApplicationRecord
self.ignored_columns = %w[totp_timestamp idv_attempted_at idv_attempts attribute_cost
failed_attempts locked_at]
self.ignored_columns = %w[totp_timestamp]
include NonNullUuid

include ::NewRelic::Agent::MethodTracer
Expand Down
19 changes: 19 additions & 0 deletions db/primary_migrate/20220422193820_drop_unused_user_columns.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class DropUnusedUserColumns < ActiveRecord::Migration[6.1]
def up
safety_assured do
remove_column :users, :idv_attempted_at
remove_column :users, :idv_attempts
remove_column :users, :attribute_cost
remove_column :users, :failed_attempts
remove_column :users, :locked_at
end
end

def down
add_column :users, :idv_attempted_at, :datetime
add_column :users, :idv_attempts, :integer
add_column :users, :attribute_cost, :text
add_column :users, :failed_attempts, :integer
add_column :users, :locked_at, :datetime
end
end
7 changes: 1 addition & 6 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2022_04_22_190622) do
ActiveRecord::Schema.define(version: 2022_04_22_193820) do

# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
Expand Down Expand Up @@ -580,17 +580,12 @@
t.integer "second_factor_attempts_count", default: 0
t.string "uuid", limit: 255, null: false
t.datetime "second_factor_locked_at"
t.datetime "locked_at"
t.integer "failed_attempts", default: 0
t.datetime "phone_confirmed_at"
t.string "direct_otp"
t.datetime "direct_otp_sent_at"
t.datetime "idv_attempted_at"
t.integer "idv_attempts", default: 0
t.string "unique_session_id"
t.string "email_fingerprint", default: "", null: false
t.text "encrypted_email", default: "", null: false
t.string "attribute_cost"
t.text "encrypted_phone"
t.integer "otp_delivery_preference", default: 0, null: false
t.integer "totp_timestamp"
Expand Down