-
Notifications
You must be signed in to change notification settings - Fork 354
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
createdAt & updatedAt columns #3055
Comments
We can define these as mixins, which drift will consider if applied to a table, e.g mixin DateColumns on Table {
DateTimeColumn get createdAt => dateTime().default(currentDateAndTime)();
} Dealing with |
Well, I wanted to ignore this and just live with the fact that I couldn't have a simple updatedAt column but this was just a week ago so I may as well ask it I'd honestly love having updatedAt/deletedAt as a simple-to-apply strategy, they are both really useful and a lot of ORMs implement them. Emphasis on the deletedAt though, as it was not mentioned in the original post Thus being said, if I may be a little greedy, it'd be wonderful if, not only it'd be simple to apply, but also being able to soft delete a row with a simple boolean + the select doesn't count soft deleted (if not explicitely stated) |
I love the idea though. It's sick. |
Yes i get what you're saying, I've "had" the idea from GORM, I didn't even need it but at that point that was just too cool to not use :) |
The text was updated successfully, but these errors were encountered: