From 27f04e79b1a639b2f6360e9159f003a3db60f567 Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Thu, 21 Nov 2013 21:04:31 +0700 Subject: Fixed #21479 -- Favor 'migrate' over 'syncdb' in the docs. --- docs/intro/tutorial01.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'docs/intro/tutorial01.txt') diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt index 8ddfc96edc..957876baa2 100644 --- a/docs/intro/tutorial01.txt +++ b/docs/intro/tutorial01.txt @@ -263,9 +263,9 @@ that, run the following command: .. code-block:: bash - $ python manage.py syncdb + $ python manage.py migrate -The :djadmin:`syncdb` command looks at the :setting:`INSTALLED_APPS` setting +The :djadmin:`migrate` command looks at the :setting:`INSTALLED_APPS` setting and creates any necessary database tables according to the database settings in your :file:`mysite/settings.py` file. You'll see a message for each database table it creates, and you'll get a prompt asking you if you'd like to @@ -281,8 +281,8 @@ display the tables Django created. Like we said above, the default applications are included for the common case, but not everybody needs them. If you don't need any or all of them, feel free to comment-out or delete the appropriate line(s) from - :setting:`INSTALLED_APPS` before running :djadmin:`syncdb`. The - :djadmin:`syncdb` command will only create tables for apps in + :setting:`INSTALLED_APPS` before running :djadmin:`migrate`. The + :djadmin:`migrate` command will only create tables for apps in :setting:`INSTALLED_APPS`. .. _creating-models: @@ -510,17 +510,17 @@ If you're interested, also run the following commands: Looking at the output of those commands can help you understand what's actually happening under the hood. -Now, run :djadmin:`syncdb` again to create those model tables in your database: +Now, run :djadmin:`migrate` again to create those model tables in your database: .. code-block:: bash - $ python manage.py syncdb + $ python manage.py migrate -The :djadmin:`syncdb` command runs the SQL from :djadmin:`sqlall` on your +The :djadmin:`migrate` command runs the SQL from :djadmin:`sqlall` on your database for all apps in :setting:`INSTALLED_APPS` that don't already exist in your database. This creates all the tables, initial data and indexes for any -apps you've added to your project since the last time you ran syncdb. -:djadmin:`syncdb` can be called as often as you like, and it will only ever +apps you've added to your project since the last time you ran :djadmin:`migrate`. +:djadmin:`migrate` can be called as often as you like, and it will only ever create the tables that don't exist. Read the :doc:`django-admin.py documentation ` for full -- cgit v1.3