Skip to content

Commit

Permalink
Drop on_hold_duration column (#12964)
Browse files Browse the repository at this point in the history
Resolves #10896

### Description
Removes the `on_hold_duration` in the task table

### Acceptance Criteria
- [ ] Code compiles correctly

### Testing Plan
1. Migration runs smoothly
```bash
bin/rails db:migrate
```
2. Tasks no longer have the `on_hold_duration` field
```ruby
Task.last.on_hold_duration
NoMethodError: undefined method `on_hold_duration' for #<JudgeDecisionReviewTask:0x00007fc33b35f6c8>
```

### Database Changes
* [x] Query profiling performed (eyeball Rails log, check bullet and fasterer output)
* [x] #appeals-schema notified with summary and link to this PR
  • Loading branch information
hschallhorn authored and va-bot committed Dec 13, 2019
1 parent 2d7f9ae commit 7775ee7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RemoveOnHoldDurationFromTasks < ActiveRecord::Migration[5.1]
def change
safety_assured { remove_column :tasks, :on_hold_duration, :int }
end
end
3 changes: 1 addition & 2 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: 20191206024319) do
ActiveRecord::Schema.define(version: 20191213173125) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -1185,7 +1185,6 @@
t.datetime "closed_at"
t.datetime "created_at", null: false
t.text "instructions", default: [], array: true
t.integer "on_hold_duration"
t.integer "parent_id"
t.datetime "placed_on_hold_at"
t.datetime "started_at"
Expand Down

0 comments on commit 7775ee7

Please sign in to comment.