Alternative to #33 to allow to work with foreign key constraints
Adds an option to Snaphot#restore!(order_by_definition: true) which will attempts to dynamically set the restore order of the records according to the current has_snaphot_children definition.
At this point not going to merge this just going to leave it here if someone needs the code.
Pros of this approach:
Restore order can be changed with the application code (#33 cannot solve this problem)
Cons of this approach
Cannot determine restore order for polymorphic associations (#33 solves this issue)
Alternative to #33 to allow to work with foreign key constraints
Adds an option to Snaphot#restore!(order_by_definition: true) which will attempts to dynamically set the restore order of the records according to the current
has_snaphot_children
definition.At this point not going to merge this just going to leave it here if someone needs the code.
Pros of this approach:
Cons of this approach