You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@anuj9196 I understand this was opened a while ago but this might come to be useful for others in the future. Your migrations should be kept across different environments and therefore be distributed along with your code.
As such you should only ever run the makemigrations command after a change in one of your models. This will generate a migration file which you should commit and distribute along with your code.
Once you distribute said code, you should only have to run the migrate command in automatic deployment.
I'm using this plugin in my application and now have written a model in which I need to add AbstractApplication as foreign key.
Since, I can't use it directly. I created a blank model extending AbstractApplication.
Then I run following commands before actually using it in the application.
then added CustomApplication to settings.py
Then created my required model and used settings.OAUTH2_PROVIDER_APPLICATION_MODEL as ForeignKey.
again run
makemigrations
andmigrate
command.This was done on local development environment. But how to resolve this in automatic deployment?
In deployment there will be OAUTH2_PROVIDER_APPLICATION_MODEL in settings.py before migrating the migrations and thus will create issue.
The text was updated successfully, but these errors were encountered: