I am in the same situation actually, but my main concern is that even when i have all the migrations in the file and i try to makemigrations it keep asking me to create all models even the one existing.
so i followed this : simpleisbetterthancomplex.com/tuto... to restart but nothing.
like migration 0004 has my models, and i when i make migrations the 0005 ask me to CreateModel but those one are alreafy existing.
migrations from 0001 to 0004 contains my models and changes that are already applied in the db
when creating migration 0005 (with makemigrations) it happen to contain CreateModel() of all the existing models even the one already migrated into the DB ...
In case you do some manual modifications to your database and want the django migrations to "think it did it" you could fake the specific migration by using the "python manage.py migrate --fake yourAppName 00nn_migration_number" command.
This will mark the migrations as applied without modifying the database tables field.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am in the same situation actually, but my main concern is that even when i have all the migrations in the file and i try to makemigrations it keep asking me to create all models even the one existing.
so i followed this : simpleisbetterthancomplex.com/tuto... to restart but nothing.
like migration 0004 has my models, and i when i make migrations the 0005 ask me to CreateModel but those one are alreafy existing.
By "models" here do you mean "table" and not the model class definition?
Yes, let's take an example of my situation,
migrations from 0001 to 0004 contains my models and changes that are already applied in the db
when creating migration 0005 (with makemigrations) it happen to contain CreateModel() of all the existing models even the one already migrated into the DB ...
i am stucked with that since a lot of weeks now
In case you do some manual modifications to your database and want the django migrations to "think it did it" you could fake the specific migration by using the "python manage.py migrate --fake yourAppName 00nn_migration_number" command.
This will mark the migrations as applied without modifying the database tables field.