diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/django-admin.txt | 13 | ||||
| -rw-r--r-- | docs/releases/2.2.txt | 4 |
2 files changed, 16 insertions, 1 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index c1844b8e64..6a3294788a 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -352,7 +352,8 @@ file) to standard output. You may choose what tables or views to inspect by passing their names as arguments. If no arguments are provided, models are created for views only if -the :option:`--include-views` option is used. +the :option:`--include-views` option is used. Models for partition tables are +created on PostgreSQL if the :option:`--include-partitions` option is used. Use this if you have a legacy database with which you'd like to use Django. The script will inspect the database and create a model for each table within @@ -404,6 +405,8 @@ PostgreSQL * Models are created for foreign tables. * Models are created for materialized views if :option:`--include-views` is used. +* Models are created for partition tables if + :option:`--include-partitions` is used. .. versionchanged:: 2.2 @@ -413,6 +416,14 @@ PostgreSQL Specifies the database to introspect. Defaults to ``default``. +.. django-admin-option:: --include-partitions + +.. versionadded:: 2.2 + +If this option is provided, models are also created for partitions. + +Only support for PostgreSQL is implemented. + .. django-admin-option:: --include-views .. versionadded:: 2.1 diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt index 02d3fd8682..01eb2b7d47 100644 --- a/docs/releases/2.2.txt +++ b/docs/releases/2.2.txt @@ -183,6 +183,10 @@ Management Commands * :option:`inspectdb --include-views` now creates models for materialized views on PostgreSQL. +* The new :option:`inspectdb --include-partitions` option allows creating + models for partition tables on PostgreSQL. In older versions, models are + created child tables instead the parent. + * :djadmin:`inspectdb` now introspects :class:`~django.db.models.DurationField` for Oracle and PostgreSQL. |
