-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
How do I soft delete entries in casbin_rule table? #167
Comments
@tangyang9464 @closetool @sagilio |
Maybe we should allow users to customize the table structure instead of using the default |
@tangyang9464 that would be great. The way others can make it work while there is a permanent fix is to manually change the structure of |
@basimsahaf This is not a generic field, so we will try to implement it through a custom structure |
@tangyang9464 yeah, I wrote that answer for others so they can make this work while you come up with a fix. |
@basimsahaf This is exactly what we are looking for. Unfortunately, the gorm-adapter currently does not support adding fields |
@basimsahaf you can implement and customze an adapter with soft-delete |
I've been meaning to implement soft delete on my
casbin_rule
table i.e have adeactivated_at
column that is set to the time it the policy was deleted instead of completing nuking the row from the table. This function called here mentions in the documentation that if the table has a DeletedAt column, it'll perform the soft delete. So I added a new column calleddeletedat
but it didn't really workAny ideas or tips?
The text was updated successfully, but these errors were encountered: