summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-07-25 16:19:36 +0100
committerAndrew Godwin <andrew@aeracode.org>2013-07-25 16:19:36 +0100
commitf8297f63233ccf78f923a597ed7d8327f90230c2 (patch)
treebc1cfe0e0808f032565685e23e61d53ef28bcc78 /docs/ref
parent06103c8ef53b7ac71def7ed34c337bb4b7dd89d9 (diff)
More migration docs, and conversion of all easy syncdb references
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/comments/index.txt2
-rw-r--r--docs/ref/contrib/contenttypes.txt2
-rw-r--r--docs/ref/contrib/flatpages.txt4
-rw-r--r--docs/ref/contrib/index.txt2
-rw-r--r--docs/ref/contrib/redirects.txt4
-rw-r--r--docs/ref/contrib/sites.txt2
-rw-r--r--docs/ref/databases.txt6
-rw-r--r--docs/ref/django-admin.txt16
-rw-r--r--docs/ref/models/options.txt12
9 files changed, 24 insertions, 26 deletions
diff --git a/docs/ref/contrib/comments/index.txt b/docs/ref/contrib/comments/index.txt
index 6db69d8168..c08ac21d4e 100644
--- a/docs/ref/contrib/comments/index.txt
+++ b/docs/ref/contrib/comments/index.txt
@@ -31,7 +31,7 @@ To get started using the ``comments`` app, follow these steps:
#. Install the comments framework by adding ``'django.contrib.comments'`` to
:setting:`INSTALLED_APPS`.
-#. Run ``manage.py syncdb`` so that Django will create the comment tables.
+#. Run ``manage.py migrate`` so that Django will create the comment tables.
#. Add the comment app's URLs to your project's ``urls.py``:
diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt
index fcd66a5b03..89c4a88e00 100644
--- a/docs/ref/contrib/contenttypes.txt
+++ b/docs/ref/contrib/contenttypes.txt
@@ -86,7 +86,7 @@ The ``ContentType`` model
Let's look at an example to see how this works. If you already have
the :mod:`~django.contrib.contenttypes` application installed, and then add
:mod:`the sites application <django.contrib.sites>` to your
-:setting:`INSTALLED_APPS` setting and run ``manage.py syncdb`` to install it,
+:setting:`INSTALLED_APPS` setting and run ``manage.py migrate`` to install it,
the model :class:`django.contrib.sites.models.Site` will be installed into
your database. Along with it a new instance of
:class:`~django.contrib.contenttypes.models.ContentType` will be
diff --git a/docs/ref/contrib/flatpages.txt b/docs/ref/contrib/flatpages.txt
index 11d74d75c3..be9fe0c636 100644
--- a/docs/ref/contrib/flatpages.txt
+++ b/docs/ref/contrib/flatpages.txt
@@ -55,14 +55,14 @@ or:
3. Add ``'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware'``
to your :setting:`MIDDLEWARE_CLASSES` setting.
-4. Run the command :djadmin:`manage.py syncdb <syncdb>`.
+4. Run the command :djadmin:`manage.py migrate <migrate>`.
.. currentmodule:: django.contrib.flatpages.middleware
How it works
============
-``manage.py syncdb`` creates two tables in your database: ``django_flatpage``
+``manage.py migrate`` creates two tables in your database: ``django_flatpage``
and ``django_flatpage_sites``. ``django_flatpage`` is a simple lookup table
that simply maps a URL to a title and bunch of text content.
``django_flatpage_sites`` associates a flatpage with a site.
diff --git a/docs/ref/contrib/index.txt b/docs/ref/contrib/index.txt
index e5cea01ead..727fab01dc 100644
--- a/docs/ref/contrib/index.txt
+++ b/docs/ref/contrib/index.txt
@@ -15,7 +15,7 @@ those packages have.
For most of these add-ons -- specifically, the add-ons that include either
models or template tags -- you'll need to add the package name (e.g.,
``'django.contrib.admin'``) to your :setting:`INSTALLED_APPS` setting and
- re-run ``manage.py syncdb``.
+ re-run ``manage.py migrate``.
.. _"batteries included" philosophy: http://docs.python.org/tutorial/stdlib.html#batteries-included
diff --git a/docs/ref/contrib/redirects.txt b/docs/ref/contrib/redirects.txt
index 0c0cb2a3c2..eefbb96721 100644
--- a/docs/ref/contrib/redirects.txt
+++ b/docs/ref/contrib/redirects.txt
@@ -18,12 +18,12 @@ To install the redirects app, follow these steps:
2. Add ``'django.contrib.redirects'`` to your :setting:`INSTALLED_APPS` setting.
3. Add ``'django.contrib.redirects.middleware.RedirectFallbackMiddleware'``
to your :setting:`MIDDLEWARE_CLASSES` setting.
-4. Run the command :djadmin:`manage.py syncdb <syncdb>`.
+4. Run the command :djadmin:`manage.py migrate <migrate>`.
How it works
============
-``manage.py syncdb`` creates a ``django_redirect`` table in your database. This
+``manage.py migrate`` creates a ``django_redirect`` table in your database. This
is a simple lookup table with ``site_id``, ``old_path`` and ``new_path`` fields.
The ``RedirectFallbackMiddleware`` does all of the work. Each time any Django
diff --git a/docs/ref/contrib/sites.txt b/docs/ref/contrib/sites.txt
index 65838dfa3e..48f781310c 100644
--- a/docs/ref/contrib/sites.txt
+++ b/docs/ref/contrib/sites.txt
@@ -264,7 +264,7 @@ To enable the sites framework, follow these steps:
SITE_ID = 1
-3. Run :djadmin:`syncdb`.
+3. Run :djadmin:`migrate`.
``django.contrib.sites`` registers a
:data:`~django.db.models.signals.post_syncdb` signal handler which creates a
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index 29f2f3972d..60153eb735 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -224,7 +224,7 @@ If you upgrade an existing project to MySQL 5.5.5 and subsequently add some
tables, ensure that your tables are using the same storage engine (i.e. MyISAM
vs. InnoDB). Specifically, if tables that have a ``ForeignKey`` between them
use different storage engines, you may see an error like the following when
-running ``syncdb``::
+running ``migrate``::
_mysql_exceptions.OperationalError: (
1005, "Can't create table '\\db_name\\.#sql-4a8_ab' (errno: 150)"
@@ -663,7 +663,7 @@ required.
.. _`Oracle Database Server`: http://www.oracle.com/
.. _`cx_Oracle`: http://cx-oracle.sourceforge.net/
-In order for the ``python manage.py syncdb`` command to work, your Oracle
+In order for the ``python manage.py migrate`` command to work, your Oracle
database user must have privileges to run the following commands:
* CREATE TABLE
@@ -752,7 +752,7 @@ Oracle imposes a name length limit of 30 characters. To accommodate this, the
backend truncates database identifiers to fit, replacing the final four
characters of the truncated name with a repeatable MD5 hash value.
-When running syncdb, an ``ORA-06552`` error may be encountered if
+When running ``migrate``, an ``ORA-06552`` error may be encountered if
certain Oracle keywords are used as the name of a model field or the
value of a ``db_column`` option. Django quotes all identifiers used
in queries to prevent most such problems, but this error can still
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 73992623aa..05fc8a1191 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -242,10 +242,8 @@ flush
.. django-admin:: flush
-Returns the database to the state it was in immediately after :djadmin:`syncdb`
-was executed. This means that all data will be removed from the database, any
-post-synchronization handlers will be re-executed, and the ``initial_data``
-fixture will be re-installed.
+Removes all data from the database, re-executes any post-synchronization
+handlers, and reinstalls any initial data fixtures.
The :djadminopt:`--noinput` option may be provided to suppress all user
prompts.
@@ -1293,7 +1291,7 @@ This command is only available if Django's :doc:`authentication system
Creates a superuser account (a user who has all permissions). This is
useful if you need to create an initial superuser account but did not
-do so during ``syncdb``, or if you need to programmatically generate
+do so during the first ``migrate``, or if you need to programmatically generate
superuser accounts for your site(s).
When run interactively, this command will prompt for a password for
@@ -1379,7 +1377,7 @@ allows for the following options:
Example usage::
- django-admin.py syncdb --pythonpath='/home/djangoprojects/myproject'
+ django-admin.py migrate --pythonpath='/home/djangoprojects/myproject'
Adds the given filesystem path to the Python `import search path`_. If this
isn't provided, ``django-admin.py`` will use the ``PYTHONPATH`` environment
@@ -1394,7 +1392,7 @@ setting the Python path for you.
Example usage::
- django-admin.py syncdb --settings=mysite.settings
+ django-admin.py migrate --settings=mysite.settings
Explicitly specifies the settings module to use. The settings module should be
in Python package syntax, e.g. ``mysite.settings``. If this isn't provided,
@@ -1408,7 +1406,7 @@ Note that this option is unnecessary in ``manage.py``, because it uses
Example usage::
- django-admin.py syncdb --traceback
+ django-admin.py migrate --traceback
By default, ``django-admin.py`` will show a simple error message whenever an
:class:`~django.core.management.CommandError` occurs, but a full stack trace
@@ -1424,7 +1422,7 @@ will also output a full stack trace when a ``CommandError`` is raised.
Example usage::
- django-admin.py syncdb --verbosity 2
+ django-admin.py migrate --verbosity 2
Use ``--verbosity`` to specify the amount of notification and debug information
that ``django-admin.py`` should print to the console.
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
index d54af37e86..6eeed51b6f 100644
--- a/docs/ref/models/options.txt
+++ b/docs/ref/models/options.txt
@@ -106,9 +106,9 @@ Django quotes column and table names behind the scenes.
.. attribute:: Options.managed
Defaults to ``True``, meaning Django will create the appropriate database
- tables in :djadmin:`syncdb` and remove them as part of a :djadmin:`flush`
- management command. That is, Django *manages* the database tables'
- lifecycles.
+ tables in :djadmin:`migrate` or as part of migrations and remove them as
+ part of a :djadmin:`flush` management command. That is, Django
+ *manages* the database tables' lifecycles.
If ``False``, no database table creation or deletion operations will be
performed for this model. This is useful if the model represents an existing
@@ -192,9 +192,9 @@ Django quotes column and table names behind the scenes.
.. admonition:: Changing order_with_respect_to
``order_with_respect_to`` adds an additional field/database column
- named ``_order``, so be sure to handle that as you would any other
- change to your models if you add or change ``order_with_respect_to``
- after your initial :djadmin:`syncdb`.
+ named ``_order``, so be sure to make and apply the appropriate
+ migrations if you add or change ``order_with_respect_to``
+ after your initial :djadmin:`migrate`.
``ordering``
------------