-
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
Modify Model's deleted field to be a date #2041
Comments
I'm agree whit this point. I think we could use 'deleted_at' as flag field but also as a log field. |
I'm glad to work on this some, but it seems like a significant enough change that it might merit some collaboration. Could we maybe get a new branch for this? |
Maybe it's overkill - when I first looked it seemed that this would need changes in a bunch of places but I don't have my head around the whole thing yet. I'll take a look soon. |
Cool. If you run into anything definitely let me know and I'll see what I can do. |
I think #2051 is ready to go for this. It didn't end up being nearly as big a change as I thought, but has a lot of downstream implications so I would appreciate a second set of eyes. |
@MGatner Thanks so much! I ran out of time to look at it last night. Very close. Just a couple of small items on it. |
I've been thinking about this a lot for the past few months, and I was in error to simply use a deleted (bool) field to represent soft deletions. Using a
deleted_at
field that is a date and treated the same ascreated_at
andupdated_at
is how it should be done. This allows you to actually investigate when it was deleted if you need to, without needing to build a complete action logging system.If this is going to happen, it has to be now, before the first RC.
The text was updated successfully, but these errors were encountered: