From d03e751e72314069063e415fa54d968c83523e60 Mon Sep 17 00:00:00 2001 From: Malick Diarra Date: Mon, 1 Apr 2024 15:19:56 -0400 Subject: [PATCH 1/4] changelog: Upcoming Features, Auth, Migration for password compromised check --- ...40401185713_add_check_password_compromised_at_to_users.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/primary_migrate/20240401185713_add_check_password_compromised_at_to_users.rb diff --git a/db/primary_migrate/20240401185713_add_check_password_compromised_at_to_users.rb b/db/primary_migrate/20240401185713_add_check_password_compromised_at_to_users.rb new file mode 100644 index 00000000000..9a7c4a2a823 --- /dev/null +++ b/db/primary_migrate/20240401185713_add_check_password_compromised_at_to_users.rb @@ -0,0 +1,5 @@ +class AddCheckPasswordCompromisedAtToUsers < ActiveRecord::Migration[7.1] + def change + add_column :users, :check_password_compromised_at, :datetime, default: nil + end +end diff --git a/db/schema.rb b/db/schema.rb index bf030067ebe..407751a8533 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_03_26_181600) do +ActiveRecord::Schema[7.1].define(version: 2024_04_01_185713) do # These are extensions that must be enabled in order to support this database enable_extension "citext" enable_extension "pg_stat_statements" @@ -613,6 +613,7 @@ t.string "encrypted_recovery_code_digest_multi_region" t.datetime "second_mfa_reminder_dismissed_at" t.datetime "piv_cac_recommended_dismissed_at" + t.datetime "check_password_compromised_at" t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["uuid"], name: "index_users_on_uuid", unique: true end From 1425996f2d016ff7b220f6886ab0c3b9d2154877 Mon Sep 17 00:00:00 2001 From: Malick Diarra Date: Fri, 12 Apr 2024 15:39:21 -0400 Subject: [PATCH 2/4] fix schema from merge conflict --- db/schema.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 538fd88fa2c..ab87aa880d7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -612,11 +612,8 @@ t.string "encrypted_recovery_code_digest_multi_region" t.datetime "second_mfa_reminder_dismissed_at" t.datetime "piv_cac_recommended_dismissed_at" -<<<<<<< HEAD t.datetime "check_password_compromised_at" -======= t.datetime "sign_in_new_device_at" ->>>>>>> origin/main t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["sign_in_new_device_at"], name: "index_users_on_sign_in_new_device_at" t.index ["uuid"], name: "index_users_on_uuid", unique: true From 6d5ed636c691f27dbd8a99d71c1b6669635fbeb0 Mon Sep 17 00:00:00 2001 From: Malick Diarra Date: Tue, 16 Apr 2024 09:40:52 -0400 Subject: [PATCH 3/4] reword migration to follow naming convention --- ...40401185713_add_check_password_compromised_at_to_users.rb | 5 ----- ...401185713_add_password_compromised_checked_at_to_users.rb | 5 +++++ db/schema.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 db/primary_migrate/20240401185713_add_check_password_compromised_at_to_users.rb create mode 100644 db/primary_migrate/20240401185713_add_password_compromised_checked_at_to_users.rb diff --git a/db/primary_migrate/20240401185713_add_check_password_compromised_at_to_users.rb b/db/primary_migrate/20240401185713_add_check_password_compromised_at_to_users.rb deleted file mode 100644 index 9a7c4a2a823..00000000000 --- a/db/primary_migrate/20240401185713_add_check_password_compromised_at_to_users.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddCheckPasswordCompromisedAtToUsers < ActiveRecord::Migration[7.1] - def change - add_column :users, :check_password_compromised_at, :datetime, default: nil - end -end diff --git a/db/primary_migrate/20240401185713_add_password_compromised_checked_at_to_users.rb b/db/primary_migrate/20240401185713_add_password_compromised_checked_at_to_users.rb new file mode 100644 index 00000000000..0397c23147e --- /dev/null +++ b/db/primary_migrate/20240401185713_add_password_compromised_checked_at_to_users.rb @@ -0,0 +1,5 @@ +class AddPasswordCompromisedCheckedAtToUsers < ActiveRecord::Migration[7.1] + def change + add_column :users, :password_compromised_checked_at, :datetime, default: nil + end +end diff --git a/db/schema.rb b/db/schema.rb index ab87aa880d7..0a2ff1e3248 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -612,7 +612,7 @@ t.string "encrypted_recovery_code_digest_multi_region" t.datetime "second_mfa_reminder_dismissed_at" t.datetime "piv_cac_recommended_dismissed_at" - t.datetime "check_password_compromised_at" + t.datetime "password_compromised_checked_at" t.datetime "sign_in_new_device_at" t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["sign_in_new_device_at"], name: "index_users_on_sign_in_new_device_at" From 5016297aaec48094350575f13396d32d937eb8cc Mon Sep 17 00:00:00 2001 From: Malick Diarra Date: Tue, 16 Apr 2024 13:00:11 -0400 Subject: [PATCH 4/4] reshake migration --- ...416165602_add_password_compromised_checked_at_to_users.rb} | 0 db/schema.rb | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename db/primary_migrate/{20240401185713_add_password_compromised_checked_at_to_users.rb => 20240416165602_add_password_compromised_checked_at_to_users.rb} (100%) diff --git a/db/primary_migrate/20240401185713_add_password_compromised_checked_at_to_users.rb b/db/primary_migrate/20240416165602_add_password_compromised_checked_at_to_users.rb similarity index 100% rename from db/primary_migrate/20240401185713_add_password_compromised_checked_at_to_users.rb rename to db/primary_migrate/20240416165602_add_password_compromised_checked_at_to_users.rb diff --git a/db/schema.rb b/db/schema.rb index 0a2ff1e3248..8f5662f443d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_04_11_163520) do +ActiveRecord::Schema[7.1].define(version: 2024_04_16_165602) do # These are extensions that must be enabled in order to support this database enable_extension "citext" enable_extension "pg_stat_statements" @@ -612,8 +612,8 @@ t.string "encrypted_recovery_code_digest_multi_region" t.datetime "second_mfa_reminder_dismissed_at" t.datetime "piv_cac_recommended_dismissed_at" - t.datetime "password_compromised_checked_at" t.datetime "sign_in_new_device_at" + t.datetime "password_compromised_checked_at" t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["sign_in_new_device_at"], name: "index_users_on_sign_in_new_device_at" t.index ["uuid"], name: "index_users_on_uuid", unique: true