Open
Conversation
awwaiid
reviewed
Mar 14, 2026
Comment on lines
+3
to
+4
| add_column :items, :type, :string, default: 'ConcreteItem', null: false | ||
| Item.where.not(kit_id: nil).update_all(type: 'KitItem', updated_at: Time.zone.now) |
awwaiid
reviewed
Mar 14, 2026
| t.index ["user_id"], name: "index_deprecated_feedback_messages_on_user_id" | ||
| end | ||
|
|
||
| create_table "diaper_drive_participants", id: :serial, force: :cascade do |t| |
Collaborator
There was a problem hiding this comment.
Unrelated table drop -- is it incorrectly in the main branch, or is this a mistake in the PR?
awwaiid
requested changes
Mar 14, 2026
Collaborator
awwaiid
left a comment
There was a problem hiding this comment.
CI failures look like they are at least from some SQL reports. Also some stray things got into the schema.rb
Concept continues to be good and good incremental step. One validation to add (in the next PR probably) is that a ConcreteItem should not be allowed to have any line_items, I think?
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.
This PR is the next step on the Kit roadmap #3652.
This creates two new classes, KitItem and ConcreteItem, and turns Item into a parent class by adding a
typecolumn and Single Table Inheritance. It renames the association between kits and items tokit_itemto make this more explicit.The next PR will have us actually switch from creating / updating kits to creating / updating KitItems, and move the sync from kit -> item to instead be kit_item -> kit (for backwards compatibility - we'll stop looking at kits entirely unless something goes wrong). We'll update code that reads from kits to instead read from kit items and stop following that link.
Finally we'll stop the backwards writing and kill off kits for good.
Most of this PR is just the rename of
itemtokit_item:)