-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Soft deletes use deleted_at #2051
Conversation
If any afterInsert events call their own database insert then `db->insertID()` will return that key instead of the desired version. This change grabs the insert ID before triggering the event so it can be returned (if requested) after.
* Change field used from deleted to deleted_at * Change binaries test to null / is not null
* Seed values with date instead of 1 * Test IS NULL / IS NOT NULL instead of binaries
@lonnieezell I might need some help. I think everything is correct now but I replaced |
Hmm in retrospect I wonder if it would accept |
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.
Pretty close! Thanks so much, I ran out of time to look into it last night.
IMO this merge would merit a blog entry of some kind, similar to the entity refactor, as it will require developers to intervene with database changes upon upgrading. |
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.
Looks like I missed 3 spots that need table prefixes in previous review.
Well that was quick! :) Looks good. Thanks for all of this! |
I can't tell you how glad I will be to remove all my explicit code for |
Well - glad I could help create more work for you and have you be happy about it :) |
Haha well more work now for less work later, my kinda work! |
Description
First attempt. Change all references to
deleted
to usedeleted_at
instead. Direct references to these fields now use dates, and tests checkIS NULL
andIS NOT NULL
instead of binary values.Checklist: