Quoting [email protected] (2013-05-31 07:39:24)
> From: Andrew Godwin <[email protected]>
> Date: May 30 07:03PM +0100
> Url: http://groups.google.com/group/django-developers/msg/137ab14f361fd052
>
> 2. Leave syncdb as it is, like South does, and have everything happen
> through a "migrate" command. Leads to weird interactions where each command
> knows about the other, and must be run in a certain order, but which isn't
> immediately obvious.
Order in which syncdb and migrate should be run also depends on
dependencies between apps.
For example, if you have two apps, A and B:
# A/models.py
class A(models.Model):
name = models.CharField(max_length=128)
# B/models.py
class B(models.Model):
name = models.CharField(max_length=128)
aref = models.ForeignKey(A)
Then, first you must run syncdb/migrations for A app, and *only* then
for app B.
So to fully fix migrations, Django should be aware about dependencies
between apps, which is very important not only for migrations.
--
Mantas aka sirex
__o /\
_ \<,_ -- launchpad.net/~sirex -- /\/ \
___(_)/_(_)_____________________________/_/ \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.