Skip to content

Commit

Permalink
APPEALS-51847: Institute Database Migration for Establishing 'sms_sta…
Browse files Browse the repository at this point in the history
…tus_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 18, 2024
1 parent 629796f commit b950296
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddSmSandEmailStatusToNotifications < ActiveRecord::Migration[6.0]
def change
add_column :notifications, :sms_status_reason, :string, comment: "Context around why this VA Notify notification is in the sms status"
add_column :notifications, :email_status_reason, :string, comment: "Context around why this VA Notify notification is in the email status"
end
end
4 changes: 3 additions & 1 deletion 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: 2024_06_13_202232) do
ActiveRecord::Schema.define(version: 2024_07_17_145856) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -1417,6 +1417,7 @@
t.string "email_notification_content", comment: "Full Email Text Content of Notification"
t.string "email_notification_external_id", comment: "VA Notify Notification Id for the email notification send through their API "
t.string "email_notification_status", comment: "Status of the Email Notification"
t.string "email_status_reason", comment: "Context around why this VA Notify notification is in the email status"
t.date "event_date", null: false, comment: "Date of Event"
t.string "event_type", null: false, comment: "Type of Event"
t.bigint "notifiable_id"
Expand All @@ -1432,6 +1433,7 @@
t.string "sms_notification_status", comment: "Status of SMS/Text Notification"
t.string "sms_response_content", comment: "Message body of the sms notification response."
t.datetime "sms_response_time", comment: "Date and Time of the sms notification response."
t.string "sms_status_reason", comment: "Context around why this VA Notify notification is in the sms status"
t.datetime "updated_at", comment: "TImestamp of when Notification was Updated"
t.index ["appeals_id", "appeals_type"], name: "index_appeals_notifications_on_appeals_id_and_appeals_type"
t.index ["email_notification_external_id"], name: "index_notifications_on_email_notification_external_id"
Expand Down

0 comments on commit b950296

Please sign in to comment.