0

I have 3 migrations already thats in production

Migration-1 Migration-2 Migration-3

Now, Im adding some dev work and constantly trying out different things and end up with 5 additional migrations.

Migration-1 Migration-2 Migration-3 Migration-4 Migration-5 Migration-6 Migration-7 Migration-8

Question:- When I take and apply the migration will Django migrations will automatically start from migration-4 until migration-8?

Im trying to understand the workflow but could not find a good document.

user1050619
  • 19,822
  • 85
  • 237
  • 413

1 Answers1

1

In fact django save the applied datamigration scripts in a table in your database called django_migrations, so he can track which one is applied and start from the next. So if a script is already applied, he will not be applied again until you delete it from the database.

python manage.py showmigrations --list

This will list all apps in the project and the migrations associated with each app. Also it will but a big X next to the migrations that have already been applied.

To understand more about the django migrations in depth I will recommend this good article

Dhia
  • 10,119
  • 11
  • 58
  • 69