I've experienced this problem many times and the solution is to simply
change the name of the model then do the migration and after that you can
change the model name to the original name and run the migration again, I
think it's a bug in django.

On Sun, Jul 19, 2020 at 8:47 PM Heet Gupta <guptahee...@gmail.com> wrote:

> Firstly push your code containing the migrations folder to heroku ("git
> push heroku master"), then follow the below steps -
>
> In your terminal run the command "heroku run bash".
> It will open the heroku terminal for you.
> Now In the heroku terminal run "python manage.py migrate"
>
>
> On Sunday, July 19, 2020 at 10:18:18 PM UTC+5:30, Aman Mandloi wrote:
>>
>> Added a small model 'new_model' in existing app 'existing_app' on Django,
>> Entered commands manage.py makemigrations and manage.py migrate it
>> migrated changes to local database.
>> Tried to apply same on heroku but its not working there. I then tried to
>> setup heroku database in local settings.py of project and migrations worked
>> but it shown some well known error, I have attached the output with this
>> discusssion. Attaching the final screenshot as output.
>>
>> _________________Just In Case if it may
>> help___________________________________________________
>> The following are the methods I have applied before the final solution:-
>> 1. With heroku run manage.py makemigrations
>> 2. Adding makemigrations command to procfile
>> 3. Pushing migrations as well, so it may replace server migrations
>> The all three mentioned steps provided this output:- "No migrations to
>> apply, and on migrate it shows you dont have new migrations",
>> helping out to migrate changes on database.
>> Thank You.
>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/223e454d-91ce-4b1d-9c8d-b70497e407bdo%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/223e454d-91ce-4b1d-9c8d-b70497e407bdo%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE0AZGLb-LWegvZfcz21OyWfvxHjz%2BnLPWf2s4NwQ-t%3DgcaKLg%40mail.gmail.com.

Reply via email to