mirror of
https://github.com/django/django.git
synced 2025-08-23 10:19:13 +00:00
[1.6.x] Fixed #5726 -- Documented that inspectdb doesn't detect defaults.
Backport of 15cafaa565 from master
This commit is contained in:
parent
955fdc8cdb
commit
75d7bb8d43
@ -314,6 +314,11 @@ needed.
|
|||||||
``inspectdb`` works with PostgreSQL, MySQL and SQLite. Foreign-key detection
|
``inspectdb`` works with PostgreSQL, MySQL and SQLite. Foreign-key detection
|
||||||
only works in PostgreSQL and with certain types of MySQL tables.
|
only works in PostgreSQL and with certain types of MySQL tables.
|
||||||
|
|
||||||
|
Django doesn't create database defaults when a
|
||||||
|
:attr:`~django.db.models.Field.default` is specified on a model field.
|
||||||
|
Similarly, database defaults aren't translated to model field defaults or
|
||||||
|
detected in any fashion by ``inspectdb``.
|
||||||
|
|
||||||
By default, ``inspectdb`` creates unmanaged models. That is, ``managed = False``
|
By default, ``inspectdb`` creates unmanaged models. That is, ``managed = False``
|
||||||
in the model's ``Meta`` class tells Django not to manage each table's creation
|
in the model's ``Meta`` class tells Django not to manage each table's creation
|
||||||
and deletion. If you do want to allow Django to manage the table's lifecycle,
|
and deletion. If you do want to allow Django to manage the table's lifecycle,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user