diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/management/sql.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/sql.py b/django/core/management/sql.py index 27ada10248..42ccafa2c5 100644 --- a/django/core/management/sql.py +++ b/django/core/management/sql.py @@ -133,7 +133,7 @@ def sql_custom(app, style, connection): def sql_indexes(app, style, connection): "Returns a list of the CREATE INDEX SQL statements for all models in the given app." output = [] - for model in models.get_models(app): + for model in models.get_models(app, include_auto_created=True): output.extend(connection.creation.sql_indexes_for_model(model, style)) return output @@ -141,7 +141,7 @@ def sql_indexes(app, style, connection): def sql_destroy_indexes(app, style, connection): "Returns a list of the DROP INDEX SQL statements for all models in the given app." output = [] - for model in models.get_models(app): + for model in models.get_models(app, include_auto_created=True): output.extend(connection.creation.sql_destroy_indexes_for_model(model, style)) return output |
