amy
amy copied to clipboard
Recognize new model fields as part of seeding scripts
Currently, if seeding has already been run, and then the seeding script is updated with a new model field, running the seeding again will not update those objects.
A better way would be to write your own seed_models
which, once it finds out that a model exists, updates it instead of moving on.
Current version of seed_models
could be extended with an optional model_update_callable
we could call instead of calling continue
in amy/workshops/utils/seeding.pyL27
.
Originally posted by @pbanaszkiewicz in https://github.com/carpentries/amy/pull/2431#discussion_r1244141975
From @elichad - putting this as low priority because it is primarily developer focused, and we may not run into any problems with our current projects. Should be addressed before implementing CI/CD changes.