Hey Marcin, Andrew,

setting manager=False wouldn't work either, as the migrations for those 
models still need to exist. I probably have references to them which makes 
them a requirement for FKs in migrations. Unmanaged models behave exactly 
the same as managed models in migrations, with one exception: the database 
operations aren't run.

/Markus

On Tuesday, December 16, 2014 1:34:17 PM UTC+1, Andrew Godwin wrote:
>
> Hi Marcin,
>
> If you're using an external tool to manage schemas of models, just set 
> managed=False on the models and Django will stop trying to change their 
> schemas (including stopping making migrations for them).
>
> Andrew
>
> On Tue, Dec 16, 2014 at 1:11 AM, Marcin Nowak <marcin....@gmail.com 
> <javascript:>> wrote:
>>
>> Hello!
>>
>> I'm using Django as a part of bigger stack where I'm using external tool 
>> to manage database migrations.
>> After migration to Django 1.7 I'm encouraged at every runserver command 
>> to execute some migrations, which may blow my databases.
>>
>> I want to bypass Django migrations to prevent any schema modification. I 
>> can bypass migrate*  commands by overriding them in my custom app, but this 
>> is a little tricky and does not cover all cases. Using managed=False is not 
>> a solution, because none of reusable apps have models defined as unmanaged 
>> (same for django.contrib, especially auth and sessions).
>> That's why I need to bypass migrations globally.
>>
>> Have you ever considered possibility to allow disabling it? Maybe via 
>> some setting to use kind a DummyMigrationExecutor instead of 
>> MigrationExecutor? 
>>
>> Cheers,
>> Marcin 
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-develop...@googlegroups.com <javascript:>.
>> To post to this group, send email to django-d...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/a27293a1-4212-4a2a-ae44-4720fc674162%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-developers/a27293a1-4212-4a2a-ae44-4720fc674162%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f982778d-eb79-4c74-921c-2028d07138f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to