aminalaee/sqladmin

override delete model method to perform soft delete

sonngopg opened this issue · 1 comments

Checklist

  • There are no similar issues or pull requests for this yet.

Is your feature related to a problem? Please describe.

I need to do a soft delete instead of a hard delete

Describe the solution you would like.

I think there needs to be a new method called soft_delete so that the custom field will update in the database, the default will be field is_deleted and deleted_at

Describe alternatives you considered

No response

Additional context

No response

I think you can override the delete method to change it to soft delete instead.
There's no out of the box option since it can't know which field you want to use for soft delete.