1. A device, comprising: one or more processors that execute instructions to perform operations to: receive information that identifies a source database and a destination database; receive information that identifies an entity instance included in the source database; determine a base data structure, included in the source database, that is associated with the entity instance; generate a dependency graph that identifies a dependency between the base data structure and another data structure; receive an instruction to perform an operation relating to modifying or analyzing the destination database, the operation selectively including a migration operation from the source database to the destination database or a deletion operation from the destination database; determine an evaluation order for traversing the dependency graph to generate code for performing the operation, the evaluation order being based on the operation to be performed and the dependency between the base data structure and the other data structure, the evaluation order indicating a traversal of the dependency graph top-down in a hierarchy of child nodes and parent nodes if the operation includes the migration operation, and the evaluation order indicating a traversal of the dependency graph bottom-up in the hierarchy of child nodes and parent nodes if the operation includes the deletion operation; traverse the dependency graph in the evaluation order; generate a plurality of portions of code corresponding to respective data structures identified by the dependency graph based on traversing the dependency graph, the plurality of portions of code selectively including code for at least one of migrating the respective data structures from the source database to the destination database or deleting the respective data structures from the destination database; and cause execution of the plurality of portions of code based on the evaluation order, the execution causing the operation to be performed using the base data structure and the other data structure, when the operation includes the migration operation, the execution causing the migration operation to migrate a parent data structure before a child data structure based on the evaluation order, and when the operation includes the deletion operation, the execution causing the deletion operation to delete a child data structure before a parent data structure based on the evaluation order.