diff --git a/django/core/management/commands/sqlcustom.py b/django/core/management/commands/sqlcustom.py index 2148a9f307..68d4fe3c9f 100644 --- a/django/core/management/commands/sqlcustom.py +++ b/django/core/management/commands/sqlcustom.py @@ -7,4 +7,4 @@ class Command(AppCommand): def handle_app(self, app, **options): from django.core.management.sql import sql_custom - return '\n'.join(sql_custom(app)) + return '\n'.join(sql_custom(app, self.style)) diff --git a/django/core/management/sql.py b/django/core/management/sql.py index 884063f4f0..1757d4d7a0 100644 --- a/django/core/management/sql.py +++ b/django/core/management/sql.py @@ -238,7 +238,7 @@ def sql_indexes(app, style): def sql_all(app, style): "Returns a list of CREATE TABLE SQL, initial-data inserts, and CREATE INDEX SQL for the given module." - return sql_create(app, style) + sql_custom(app) + sql_indexes(app, style) + return sql_create(app, style) + sql_custom(app, style) + sql_indexes(app, style) def sql_model_create(model, style, known_models=set()): """