use of migrate command and how to see the tables

24 views
Skip to first unread message

yasar arafath Kajamydeen

unread,
Jul 19, 2019, 4:22:33 AM7/19/19
to Django users
Hi all,

can some one tell me what is the use of migrate command ?

when i enter the command i got the following error (No migration to apply) . I dont know what to do further and also i would like to create tables (sqlite) . 


migrate.JPG



Note - I am a beginer to Django ..  Most welcome with your reply

Jani Tiainen

unread,
Jul 19, 2019, 4:33:08 AM7/19/19
to django...@googlegroups.com
Hi.

Migrate command applies migrations, changes to your models, into database.

For example if you add a new field in your model you need to create a migration (piece of code that reflects your change) using makemigrations command.

Once you have made migration(s) you need to apply them so database contains a colum in a table that your model represents.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e715d8b3-9ed7-433d-9bf2-94899b196289%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yasar arafath Kajamydeen

unread,
Jul 19, 2019, 5:58:17 AM7/19/19
to Django users
Hi Jani,

Thanks for the reply. Please try to solve the error which i shared (screen shot ).

Regards,
Yasar Arafath K



On Friday, July 19, 2019 at 4:33:08 PM UTC+8, Jani Tiainen wrote:
Hi.

Migrate command applies migrations, changes to your models, into database.

For example if you add a new field in your model you need to create a migration (piece of code that reflects your change) using makemigrations command.

Once you have made migration(s) you need to apply them so database contains a colum in a table that your model represents.


pe 19. heinäk. 2019 klo 11.23 yasar arafath Kajamydeen <yasa...@gmail.com> kirjoitti:
Hi all,

can some one tell me what is the use of migrate command ?

when i enter the command i got the following error (No migration to apply) . I dont know what to do further and also i would like to create tables (sqlite) . 


migrate.JPG



Note - I am a beginer to Django ..  Most welcome with your reply

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

James Bennett

unread,
Jul 19, 2019, 6:01:14 AM7/19/19
to django...@googlegroups.com
On Fri, Jul 19, 2019 at 2:58 AM yasar arafath Kajamydeen <yasa...@gmail.com> wrote:
Thanks for the reply. Please try to solve the error which i shared (screen shot ).

It is not an error. You have no migrations to apply, so the migrate command is telling you it sees nothing to do.

It may help you to read the official Django tutorial, which includes creating models and migrations and applying them:

neha deshpande

unread,
Jul 19, 2019, 10:32:47 AM7/19/19
to django...@googlegroups.com
Because there are no any new tables or modifications in existing tables. It is not an error. 
You use migrate command to reflect changes to your database.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Afotro Ben

unread,
Jul 19, 2019, 10:33:00 AM7/19/19
to Django users

in my opinion migrate is the command that saves your code for django to run or tells django that an application has been installed.

yasar arafath Kajamydeen

unread,
Jul 20, 2019, 11:15:34 AM7/20/19
to django...@googlegroups.com
Thanks all who is replied to my post .... 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Luis O Sulbaran L

unread,
Jul 20, 2019, 9:10:24 PM7/20/19
to django...@googlegroups.com
Ejemplo,  
Registra o actualizar cambios realizados a nuestros modelos:
python manage.py makemigrations nombre_aplicación






04146493449--0261-7699778 



Reply all
Reply to author
Forward
0 new messages