About Lesson
What are Migrations?
Migrations are Django’s way of propagating changes made to models (e.g., adding a new field) to the database schema.
Creating Migrations
- Generate migration files:
- Apply migrations to the database:
python manage.py makemigrations
Output:
Migrations for 'myapp':
myapp/migrations/0001_initial.py
python manage.py migrate
Join the conversation