-
Notifications
You must be signed in to change notification settings - Fork 899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New optional column: item_subtype #1143
Conversation
This partially reverts commit 58369e1. I have kept the specs, skipped. Per the following, this approach does not seem to be working: - #1135 - #1137 - seanlinsley#1
If present, will be populated with subclass name. This will be used by PT-AT.
ac6443c
to
e907295
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have a generator similar to update_sti
that fills in item_subtype
for historic records.
} | ||
} | ||
} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well at least keep this enhancement to the spec!
spec/models/person_spec.rb
Outdated
@@ -5,10 +5,8 @@ | |||
# The `Person` model: | |||
# | |||
# - has a dozen associations of various types | |||
# - has a custom serializer, TimeZoneSerializer, for its `time_zone` attribute | |||
# - has a custome serializer, TimeZoneSerializer, for its `time_zone` attribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo
If you're committed to going in this direction then it might be somewhat moot at this point, but I've pushed an update to Sean's PR#1 based on your review. |
|
I'll test this as soon as I can, but in the meantime these tests should verify the behavior if you'd like to add them to this PR: |
This PR fixes both issues 🙌 |
4b253c2
to
934c1d9
Compare
934c1d9
to
8b4ec38
Compare
Tests added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're now using this branch in production & will likely remove our Thank you both for all the time you've put into the upcoming release 💛 |
It does have the data we would need, and potentially covers Rick Tyler's interest around the store_base_sti_class gem. It does require a fair bit of rework internally, doing checks around We are considering both removing |
Great, thanks.
If y'all are concerned about disk space, we could choose to store |
I usually delete topic branches immediately after merging, so please switch to |
For us the disk space is of interest only in light of how far-reaching it is to have a half billion records loaded into RAM at once. We've got 5 covering indexes that leverage |
Dang. And I thought Sean has a lot of records 😅
db indexing practices are a personal interest of mine. I'd love to hear more about the shape of the queries and brainstorm about your index design. If it's not private IP, feel free to email me and we can chat more about about it. |
v10.0.0 * tag 'v10.0.0': (40 commits) Release 10.0.0 Testing the :skip option allow `object_changes_adapter` to use the default behavior Lint: Improve Metrics/AbcSize from 22 to 21 Docs: which class attributes are public/private Docs: installation Docs: Update changelog and readme re: paper-trail-gem#1143 Generator to update historic item_subtype entries (paper-trail-gem#1144) Testing joins, as recommended by Sean Add optional column: item_subtype Revert paper-trail-gem#1108 (lorint's STI fix) Lint: RSpec/EmptyLineAfterExampleGroup Update development dependencies Lint: RSpec/InstanceVariable in model_spec, ctn'd Code style re: errors Docs: Fix link to bug report Add association tracking removal exception Readme fix: caller.find {} rather than caller.first {} Do not require PT-AT Docs: Organizing the changelog for 10.0.0 ...
v10.0.0 * tag 'v10.0.0': (40 commits) Release 10.0.0 Testing the :skip option allow `object_changes_adapter` to use the default behavior Lint: Improve Metrics/AbcSize from 22 to 21 Docs: which class attributes are public/private Docs: installation Docs: Update changelog and readme re: paper-trail-gem#1143 Generator to update historic item_subtype entries (paper-trail-gem#1144) Testing joins, as recommended by Sean Add optional column: item_subtype Revert paper-trail-gem#1108 (lorint's STI fix) Lint: RSpec/EmptyLineAfterExampleGroup Update development dependencies Lint: RSpec/InstanceVariable in model_spec, ctn'd Code style re: errors Docs: Fix link to bug report Add association tracking removal exception Readme fix: caller.find {} rather than caller.first {} Do not require PT-AT Docs: Organizing the changelog for 10.0.0 ...
Gives PT-AT the data it needs to fix #594. PT-AT will make changes like:
I have tested the above with the "cars and bicycles" example in
person_spec.rb
and it passes.Replaces (reverts) #1108, which has proved problematic in #1135, leading to further proposed increases in complexity such as seanlinsley#1. @lorint I know you worked hard on #1108, and I did too, but if this is actually the simpler approach, as I propose, I hope we can both approach this objectively. I've never had to revert something as large as #1108 and I don't suggest it lightly.
I haven't written the docs or the migration to populate
item_subtype
. I would like to get your opinions on this approach first.I made this an optional column because it is my understanding that this issue (#594) only affects PT-AT users with STI, a very small subset of our users.