Hi all, first contribution to a project so please let me know if I've done anything wrong! 😄
Only a small change but a key one for the functionality of this macro, I think.
Currently, when collecting the models names to check presence in the target DB, the macro only looks at node.name. This means aliased models are not checked correctly and models still in use are dropped.
Simple suggested solution is to swap current_models.append(node.name) with current_models.append(node.name if node.config.alias == None else node.config.alias)
Hi all, first contribution to a project so please let me know if I've done anything wrong! 😄
Only a small change but a key one for the functionality of this macro, I think.
Currently, when collecting the models names to check presence in the target DB, the macro only looks at
node.name
. This means aliased models are not checked correctly and models still in use are dropped.Simple suggested solution is to swap
current_models.append(node.name)
withcurrent_models.append(node.name if node.config.alias == None else node.config.alias)