Managing migrations
Django migrations is a feature of Django that allows you to manage changes to your database schema – that is, changes to the structure of your database tables and the data within them – over time, as your Django project evolves.
When you define models in Django, you’re essentially defining the structure of your database tables. However, as your project grows and changes, you might need to make alterations to these models, such as adding new fields, removing fields, or modifying existing fields. Django migrations provide a way to propagate these changes to your database schema in a controlled and consistent manner (as a version control system).
To work with migrations, we must apply the default migrations, create custom migrations, and apply custom migrations.
Applying the default migrations
Currently, note a message in the Terminal when you run the server:
You have 18 unapplied migration(s). Your project may not work properly...