Thanks Anthony!
All the db tables were defined in separate model files, which is what I would prefer, but as a last attempt to resolve the conflict I moved them all to a single models.py model file and arranged a few of the declarations to avoid that error. It is working now but I would have preferred the models in separate files, but maybe that's not possible when they have so many foreign keys.
Is it possible to stage the order which the model files are read so table declarations will be in the right sequence