Skip to content

Archive dependent records without dependent: :destroy #58

Description

@lbernick

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions