Clean up old kit table and items.kit_id column (#5679) - #5723
Open
aniketpatidar wants to merge 5 commits into
Open
aniketpatidar wants to merge 5 commits into
aniketpatidar wants to merge 5 commits into
Conversation
Contributor
Author
dorner
requested changes
Sep 25, 2026
| def up | ||
| safety_assured do | ||
| remove_foreign_key :items, :kits if foreign_key_exists?(:items, :kits) | ||
| remove_foreign_key :kit_allocations, :kits if foreign_key_exists?(:kit_allocations, :kits) |
Collaborator
There was a problem hiding this comment.
kit_allocations can be dropped entirely. It's no longer used.
Contributor
Author
There was a problem hiding this comment.
Will remove kit_allocations.
Contributor
Author
There was a problem hiding this comment.
dropped kit_allocations and its kit_allocation_type enum.
…om/aniketpatidar/human-essentials into 5679-clean-up-old-kit-table-column
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5679
Description
kitstable and removes thekit_idcolumn (and its index/foreign key) fromitems.kit_allocationstable along with itskit_allocation_typeenum.Type of change
How Has This Been Tested?
bundle exec rails db:migrateand confirmkits,kit_allocations, thekit_allocation_typeenum anditems.kit_idare gone.bundle exec rspec spec/models/kit_spec.rb spec/system/kit_system_spec.rb spec/requests/kit_requests_spec.rb spec/services/kit_create_service_spec.rb spec/models/item_spec.rb