This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Everything with no dependencies comes first. That way, when a new item is added with a dependency on an existing item, it doesn't cause the existing item to jump. | |
Of course an existing item taking a dependency on an existing item will cause a jump, may as well move the changing item. | |
An existing item taking a dependency on a new item will also jump. It doesn't really make sense to putting the new item first, out of order, if it doesn't have dependencies. | |
Basically: order by depth_of_deepest_dependency, original_order | |
*/ | |
with | |
creating_objects as ( |