Skip to content
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

Archive dependent records without dependent: :destroy #58

Open
lbernick opened this issue Jul 23, 2024 · 0 comments
Open

Archive dependent records without dependent: :destroy #58

lbernick opened this issue Jul 23, 2024 · 0 comments

Comments

@lbernick
Copy link

We are using foreign keys with "ON DELETE CASCADE" to delete child records when parents are deleted, instead of dependent: :destroy, for performance reasons. The docs say "This will only work on associations that are dependent destroy. It should be trival to change that or make it optional." Could you provide more details if there is a suggested workaround for archiving children when a parent is archived? Also, would it be possible to auto-archive children with a dependent: :delete_all relationship in addition to dependent: :destroy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant