Sahil Babbar
Sahil Babbar

Reputation: 599

Django Migrations command workflow

There are three migration commands in Django:

  1. python manage.py makemigrations
  2. python manage.py migrate
  3. python manage.py syncdb

In what order do these commands should be executed in terms of workflow of a basic project?

I am using Version: 1.8

Upvotes: 0

Views: 89

Answers (1)

knbk
knbk

Reputation: 53679

syncdb is deprecated and does the same as migrate.

Whenever you make a change to your models, and when you first create them, each time you'd want to first run makemigrations to create the migration files, then migrate to apply them to your database.

Upvotes: 3

Related Questions