On 8/29/07, Graham Carlyle <[EMAIL PROTECTED]> wrote: > > So should models in different application's never have foreign key > dependencies and so i should bring them back to one application? or does > anyone know if there is another way around this problem?
Models can and should have foreign key dependencies on other models. The issue here is entirely with the reset command, which is broken as currently implemented for many foreign key situations, including the one you describe. There are 2 options for workarounds: 1) use SQL ALTER statements rather than resetting the table. This requires writing manual SQL statements to modify the existing tables 2) Drop the entire database and start again from scratch 2 is the easier option, but isn't viable if you have data that cannot be lost. However, if you are in the initial phases of development, it should be all you need. There are a number of efforts underway working on schema evolution, which would be the 'django syntax' way of performing the equivalent of option 1. If one of these ever reaches trunk, I would expect that the reset command would be deprecated and removed. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---