You are totally right, my mistake. Sorry about that, noob here.

On Tuesday, November 12, 2019 at 12:16:12 PM UTC-6, Adam Johnson wrote:
>
> Hi Kevin,
>
> I feel like this is a support question more than a question around 
> developing Django, so I've pasted my canned response below. But to answer 
> your question: yes you have to downgrade your database while on version 
> 0.0.2. Django can't downgrade a migration without the file being there :) 
> It ignores all migrations named in the database that it doesn't have in the 
> local repository, to deal with removed apps, migration files, squashing, 
> etc.
>
> If you think the documentation is lacking, perhaps a section on third 
> party apps could be added to: 
> https://docs.djangoproject.com/en/2.2/topics/migrations/ .
>
> Thanks,
>
> Adam
>
> ---
>
> Hi!
>
> I think you've found the wrong mailing list for this post. This mailing 
> list is for the development of Django itself, not for support using Django. 
> This means the discussions of bugs and features in Django itself, rather 
> than in your code using it. People on this list are unlikely to answer your 
> support query with their limited time and energy. Read more on the mailing 
> lists at https://www.djangoproject.com/community/
>
> For support, please use the NEW Django forum at 
> https://forum.djangoproject.com , django-users mailing list, or IRC 
> #django on Freenode, or a site like Stack Overflow. There are people out 
> there willing to help on those channels, but they might not respond if you 
> don't ask your question well. Stack Overflow's question guide can help you 
> frame it well: https://stackoverflow.com/help/how-to-ask .
>
> Also if you haven't read it, please take a look at Django's Code of 
> Conduct: https://www.djangoproject.com/conduct/ . These are our "ground 
> rules" for working well as a community, and will help you get the most out 
> of Django and our fantastic community.
>
> Thanks for your understanding,
>
> Adam
>
> On Tue, 12 Nov 2019 at 17:09, Kevin Sallée <kevin...@gmail.com 
> <javascript:>> wrote:
>
>> Hi, I'm new to Django so excuse me if it's a noob question.
>>
>> I have a Django app, let's call it "project", that uses a Django reusable 
>> app, let's call it "app", version controlled on github, and tagged.
>>
>> 1. I create a first version of the app with its initial 0001_initial.py 
>> migration file, tag it 0.0.1, and add it to "project" requirements.txt
>> 2. I then run "python manage.py migrate app". This picks 0001_initial and 
>> applies the migration.
>> 3. I do changes to app, add a field, I have 0002_model_newfield.py file, 
>> I tag it 0.0.2, and change the version required in requirements.txt
>> 4. I run "python manage.py migrate app". This picks 0002_model_newfield 
>> and applies the migration.
>>
>> Now, what happens if I want to go back to version "0.0.1" of the app? I 
>> can change the requirements, reinstall the library, but migrate won't do 
>> much if I go back to a state where I have less migration files available.
>> The only thing I can do, I think, is stay on "0.0.2", do a "python 
>> manage.py migrate app 0001", and then switch back to the "0.0.1" version.
>>
>> I haven't found any information on how you version control alongside with 
>> git and downgrade django reusable apps. Maybe there is an open source 
>> project that can provide some pointers?
>>
>> I'm just starting with this and I might have more complex dependencies to 
>> deal with, I just want to make sure I'm not missing something obvious here.
>>
>> Thanks
>>
>> -- 
>> 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-d...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/e7a1404d-bb4a-401d-bdc2-9d7de1ad8e71%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-developers/e7a1404d-bb4a-401d-bdc2-9d7de1ad8e71%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Adam
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ab0ed012-caea-44ae-8e39-7e749972d2e8%40googlegroups.com.

Reply via email to