Skip to content

Commit

Permalink
CST - Added db migration to update evidence_submissions fields from t…
Browse files Browse the repository at this point in the history
…ype string to integer (#20490)

* added db migration to update fields from type string to integer

* remove reversible do and direction up/down
  • Loading branch information
pmclaren19 authored Jan 29, 2025
1 parent a52ff3c commit 61f867e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class ChangeDataTypesForEvidenceSubmissions < ActiveRecord::Migration[7.2]
# Change request_id from a string to an integer
# Change claim_id from a string to an integer
# Change tracked_item_id from a string to an integer

def change
safety_assured do
change_column :evidence_submissions, :request_id, :integer, using: 'request_id::integer'
change_column :evidence_submissions, :claim_id, :integer, using: 'claim_id::integer'
change_column :evidence_submissions, :tracked_item_id, :integer, using: 'tracked_item_id::integer'
end
end
end
8 changes: 4 additions & 4 deletions db/schema.rb

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

0 comments on commit 61f867e

Please sign in to comment.