From d6c6181f9ecf90be7d298c670ce23c0327417bb7 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 19 Aug 2014 06:14:14 -0400 Subject: [PATCH] [1.7.x] Fixed #5726 -- Documented that inspectdb doesn't detect defaults. Backport of 15cafaa565 from master --- docs/ref/django-admin.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 7d464d92d4799..a1ac8114e52d2 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -354,6 +354,11 @@ needed. ``inspectdb`` works with PostgreSQL, MySQL and SQLite. Foreign-key detection 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`` in the model's ``Meta`` class tells Django not to manage each table's creation, modification, and deletion. If you do want to allow Django to manage the