diff --git a/app/models/teacher.rb b/app/models/teacher.rb index d477da0e83..5a8c10b1fb 100644 --- a/app/models/teacher.rb +++ b/app/models/teacher.rb @@ -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 diff --git a/config/analytics.yml b/config/analytics.yml index a9211336c1..ac8a0d0f79 100644 --- a/config/analytics.yml +++ b/config/analytics.yml @@ -353,8 +353,6 @@ - id - last_sign_in_at - last_sign_in_ip - - otp_created_at - - otp_guesses - sign_in_count - trn - updated_at diff --git a/config/analytics_blocklist.yml b/config/analytics_blocklist.yml index 40853d66b9..349576c2d0 100644 --- a/config/analytics_blocklist.yml +++ b/config/analytics_blocklist.yml @@ -12,5 +12,3 @@ - confirmation_token - unlock_token - invitation_token - :teachers: - - secret_key diff --git a/db/migrate/20230808065424_remove_otp_from_teachers.rb b/db/migrate/20230808065424_remove_otp_from_teachers.rb new file mode 100644 index 0000000000..2fdc03638d --- /dev/null +++ b/db/migrate/20230808065424_remove_otp_from_teachers.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 51b22b96db..3621d45e51 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -451,9 +451,6 @@ t.string "trn" t.uuid "uuid", default: -> { "gen_random_uuid()" }, null: false t.text "canonical_email", default: "", null: false - t.datetime "otp_created_at" - t.integer "otp_guesses", default: 0, null: false - t.string "secret_key" t.index "lower((email)::text)", name: "index_teacher_on_lower_email", unique: true t.index ["canonical_email"], name: "index_teachers_on_canonical_email" t.index ["uuid"], name: "index_teachers_on_uuid", unique: true diff --git a/spec/factories/teachers.rb b/spec/factories/teachers.rb index 76ad254bfe..ced7ffe4c7 100644 --- a/spec/factories/teachers.rb +++ b/spec/factories/teachers.rb @@ -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 diff --git a/spec/models/teacher_spec.rb b/spec/models/teacher_spec.rb index c1ff16c4cb..911a8964f5 100644 --- a/spec/models/teacher_spec.rb +++ b/spec/models/teacher_spec.rb @@ -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