Skip to content

Clean up old kit table and items.kit_id column (#5679) - #5723

Open
aniketpatidar wants to merge 5 commits into
rubyforgood:mainfrom
aniketpatidar:5679-clean-up-old-kit-table-column
Open

aniketpatidar wants to merge 5 commits into
rubyforgood:mainfrom
aniketpatidar:5679-clean-up-old-kit-table-column

Conversation

@aniketpatidar

@aniketpatidar aniketpatidar commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #5679

Description

  • Deletes the old, unused kits table and removes the kit_id column (and its index/foreign key) from items.
  • Drops the unused kit_allocations table along with its kit_allocation_type enum.

Type of change

  • Clean up

How Has This Been Tested?

  • Run bundle exec rails db:migrate and confirm kits, kit_allocations, the kit_allocation_type enum and items.kit_id are gone.
  • Run relevant test suite: 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
  • Verify creating, updating, and allocating kits still works properly.

@aniketpatidar

Copy link
Copy Markdown
Contributor Author

Please review #5723, which cleans up the old kit table and column. Thanks!

@dorner

@awwaiid
awwaiid requested a review from dorner September 20, 2026 14:15
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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kit_allocations can be dropped entirely. It's no longer used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove kit_allocations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropped kit_allocations and its kit_allocation_type enum.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up old kit table/column

2 participants