Skip to content

Commit

Permalink
Remove OTP columns
Browse files Browse the repository at this point in the history
This removes the columns related to one time passwords (OTP) from the
teachers table, as we've stopped using it as a method of authentication.
  • Loading branch information
thomasleese committed Aug 9, 2023
1 parent c46bcee commit 232c744
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 16 deletions.
3 changes: 0 additions & 3 deletions app/models/teacher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
# email :string default(""), not null
# last_sign_in_at :datetime
# last_sign_in_ip :string
# otp_created_at :datetime
# otp_guesses :integer default(0), not null
# secret_key :string
# sign_in_count :integer default(0), not null
# trn :string
# uuid :uuid not null
Expand Down
2 changes: 0 additions & 2 deletions config/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,6 @@
- id
- last_sign_in_at
- last_sign_in_ip
- otp_created_at
- otp_guesses
- sign_in_count
- trn
- updated_at
Expand Down
2 changes: 0 additions & 2 deletions config/analytics_blocklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@
- confirmation_token
- unlock_token
- invitation_token
:teachers:
- secret_key
9 changes: 9 additions & 0 deletions db/migrate/20230808065424_remove_otp_from_teachers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class RemoveOtpFromTeachers < ActiveRecord::Migration[7.0]
def change
change_table :teachers, bulk: true do |t|
t.remove :secret_key, type: :string
t.remove :otp_guesses, type: :integer, default: 0, null: false
t.remove :otp_created_at, type: :datetime
end
end
end
3 changes: 0 additions & 3 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions spec/factories/teachers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
# email :string default(""), not null
# last_sign_in_at :datetime
# last_sign_in_ip :string
# otp_created_at :datetime
# otp_guesses :integer default(0), not null
# secret_key :string
# sign_in_count :integer default(0), not null
# trn :string
# uuid :uuid not null
Expand Down
3 changes: 0 additions & 3 deletions spec/models/teacher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
# email :string default(""), not null
# last_sign_in_at :datetime
# last_sign_in_ip :string
# otp_created_at :datetime
# otp_guesses :integer default(0), not null
# secret_key :string
# sign_in_count :integer default(0), not null
# trn :string
# uuid :uuid not null
Expand Down

0 comments on commit 232c744

Please sign in to comment.