#9 Django tutorials | How to see the SQL query for a migration in Django | sqlmigrate command

Опубликовано: 26 Февраль 2026
на канале: CodeShika
1,148
16

#8 Django tutorials | How to see the SQL query for a migration in Django | sqlmigrate command,    • #9 Django tutorials | How to see the SQL q...  . In this tutorial, I will teach you how to see the SQL query for a migration in Django. Django provides one command that is sqlmigrate to print the SQL query for a migration that will run by Django when we migrate.

Commands Used:
1. python manage.py makemigrations
2. python manage.py sqlmigrate
3. python manage.py migrate

Watch my recent tutorials here.

#8 Django tutorials | Showmigrations command in Django
   • #8 Django tutorials | Showmigrations comma...  

You have 17 unapplied migrations. Your project may not work properly until you apply the migrations.
   • You have 17 unapplied migrations. Your pro...  

#7 Django tutorials | What does first migrate command run do without running any makemigrations
   • #7 Django tutorials | What does first migr...  

Watch all my Django Oscar tutorials for django-oscar version 2.1 from following series

Django Oscar 2.1 tutorials
   • Django Oscar 2.1 tutorials  

Watch my Django Oscar tutorials for django-oscar version 1.6 from following series

Django Oscar E-commerce tutorials for beginners in English
   • Django Oscar E-commerce tutorials for begi...  

Watch my django-oscar-accounts package tutorials i.e. a managed account for django-oscar here:

Django Oscar Accounts 2.1 tutorials for beginners
   • Django Oscar Accounts 2.1 tutorials for be...  

Watch my Django Ajax tutorials in the following series

Django Ajax tutorials for begginers
   • Django Ajax tutorials for begginers  

Also, watch

Django tutorials
   • Django tutorials  

Friends, if you like this tutorial, please hit the like button and share, and if you want more tutorials like this please subscribe to my channel CodeShika.

#django_sql_query
#django_sqlmigrate
#CodeShika