Re: Can migrated apps depend on unmigrated apps?

2015-02-20 Thread Carsten Fuchs

Hi Collin,

thank you very much for your reply!

Am 19.02.2015 um 19:35 schrieb Collin Anderson:

If you haven't yet, you could try generating migrations for the
unmigrated app, and reference them using MIGRATION_MODULES.


I've tried this, and my real problem is that I have problems with this 
step, i.e. applying the initial migrations to the unmigrated app: Please 
see  
for details. Any help about this would very much be appreciated!


Many thanks and best regards,
Carsten

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54E74673.6090709%40cafu.de.
For more options, visit https://groups.google.com/d/optout.


Re: Can migrated apps depend on unmigrated apps?

2015-02-19 Thread Collin Anderson
Hi Carsten,

I in my experience, it _sometimes_ works to have migrated apps depend on 
unmigrated apps.

If you haven't yet, you could try generating migrations for the unmigrated 
app, and reference them using MIGRATION_MODULES.

Collin

On Tuesday, February 17, 2015 at 5:00:26 PM UTC-5, Carsten Fuchs wrote:
>
> Hi Michael, 
>
> Am 17.02.2015 um 22:44 schrieb Michael Pöhn: 
> > This is all covered in Djangos documentation... 
> > https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies 
>
> Well, no... please see below. 
>
> > Let me paste the relevant parts for you: 
> > 
> > »Be aware, however, that unmigrated apps cannot depend on migrated apps, 
> [...]« 
>
> This explains that unmigrated apps cannot depend on migrated apps. 
>
> My question is about the opposite case: Can migrated apps depend on 
> unmigrated apps? I've explained the apparent problem in greater detail 
> in my original post. 
>
> Best regards, 
> Carsten 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6ea03841-50de-413d-9f7c-5769b497b550%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can migrated apps depend on unmigrated apps?

2015-02-17 Thread Carsten Fuchs

Hi Michael,

Am 17.02.2015 um 22:44 schrieb Michael Pöhn:

This is all covered in Djangos documentation...
https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies


Well, no... please see below.


Let me paste the relevant parts for you:

»Be aware, however, that unmigrated apps cannot depend on migrated apps, [...]«


This explains that unmigrated apps cannot depend on migrated apps.

My question is about the opposite case: Can migrated apps depend on 
unmigrated apps? I've explained the apparent problem in greater detail 
in my original post.


Best regards,
Carsten

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54E3B94A.9050307%40cafu.de.
For more options, visit https://groups.google.com/d/optout.


Re: Can migrated apps depend on unmigrated apps?

2015-02-17 Thread Michael Pöhn
On 17.02.2015 21:29, Carsten Fuchs wrote:
> Hi all,
>
> Am 04.02.2015 um 18:26 schrieb Carsten Fuchs:
>> can apps that use migrations depend on unmigrated apps?
>
> Anyone please?
>
> It seems like this works in practice, but this still looks like a
> contradiction to me, and I would still be interested in some feedback
> for a firmer foundation for ongoing work…
>

This is all covered in Djangos documentation...
https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies

Let me paste the relevant parts for you:

»Be aware, however, that unmigrated apps cannot depend on migrated apps,
by the very nature of not having migrations. This means that it is not
generally possible to have an unmigrated app have a ForeignKey or
ManyToManyField to a migrated app; some cases may work, but it will
eventually fail.

Warning: Even if things appear to work with unmigrated apps depending on
migrated apps, Django may not generate all the necessary foreign key
constraints.«

br.
Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54E3B622.80103%40fsfe.org.
For more options, visit https://groups.google.com/d/optout.


Re: Can migrated apps depend on unmigrated apps?

2015-02-17 Thread Carsten Fuchs

Hi all,

Am 04.02.2015 um 18:26 schrieb Carsten Fuchs:

can apps that use migrations depend on unmigrated apps?


Anyone please?

It seems like this works in practice, but this still looks like a 
contradiction to me, and I would still be interested in some feedback 
for a firmer foundation for ongoing work…


Best regards,
Carsten

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54E3A4B9.7040009%40cafu.de.
For more options, visit https://groups.google.com/d/optout.


Can migrated apps depend on unmigrated apps?

2015-02-04 Thread Carsten Fuchs

Dear Django developers,

can apps that use migrations depend on unmigrated apps?

The documentation at 
<https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies> 
explains how dependencies work, and explicitly mentions that unmigrated 
apps cannot depend on migrated apps.


In turn it seems to imply that migrated apps *can* depend on unmigrated 
apps, but is that correct? In the docs example where `books` have a 
foreign key and thus depend on `authors`, does it really work if 
`authors` is unmigrated? How would it be able to run the `authors` 
migration to create the table the foreign key in `books` references, if 
`authors` is unmigrated?



This is an implication of my so far unfruitful attempts to add 
migrations to an older, existing app as described in thread 
<https://groups.google.com/forum/#!topic/django-users/lVS24BGFouo>, 
where I have exactly this situation:


The older app is still unmigrated (as I could not yet find a way to 
overcome the problems with making it migrated), and would like to create 
a new one in the meanwhile. The new app has a foreign key on a model in 
the old one, and now I'm wondering if it is wise to proceed...?


Any hints and help would very much be appreciated!   :-)

Best regards,
Carsten

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54D25647.7060204%40cafu.de.
For more options, visit https://groups.google.com/d/optout.