Loading django/core/management/commands/sql.py +6 −2 Original line number Diff line number Diff line Loading @@ -18,5 +18,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_create(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_create(app_config.models_module, self.style, connection) return '\n'.join(statements) django/core/management/commands/sqlall.py +6 −2 Original line number Diff line number Diff line Loading @@ -18,5 +18,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_all(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_all(app_config.models_module, self.style, connection) return '\n'.join(statements) django/core/management/commands/sqlclear.py +6 −2 Original line number Diff line number Diff line Loading @@ -18,5 +18,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_delete(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_delete(app_config.models_module, self.style, connection) return '\n'.join(statements) django/core/management/commands/sqlcustom.py +6 −2 Original line number Diff line number Diff line Loading @@ -18,5 +18,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_custom(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_custom(app_config.models_module, self.style, connection) return '\n'.join(statements) django/core/management/commands/sqldropindexes.py +6 −2 Original line number Diff line number Diff line Loading @@ -19,5 +19,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_destroy_indexes(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_destroy_indexes(app_config.models_module, self.style, connection) return '\n'.join(statements) Loading
django/core/management/commands/sql.py +6 −2 Original line number Diff line number Diff line Loading @@ -18,5 +18,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_create(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_create(app_config.models_module, self.style, connection) return '\n'.join(statements)
django/core/management/commands/sqlall.py +6 −2 Original line number Diff line number Diff line Loading @@ -18,5 +18,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_all(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_all(app_config.models_module, self.style, connection) return '\n'.join(statements)
django/core/management/commands/sqlclear.py +6 −2 Original line number Diff line number Diff line Loading @@ -18,5 +18,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_delete(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_delete(app_config.models_module, self.style, connection) return '\n'.join(statements)
django/core/management/commands/sqlcustom.py +6 −2 Original line number Diff line number Diff line Loading @@ -18,5 +18,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_custom(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_custom(app_config.models_module, self.style, connection) return '\n'.join(statements)
django/core/management/commands/sqldropindexes.py +6 −2 Original line number Diff line number Diff line Loading @@ -19,5 +19,9 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): return '\n'.join(sql_destroy_indexes(app, self.style, connections[options.get('database')])) def handle_app_config(self, app_config, **options): if app_config.models_module is None: return connection = connections[options.get('database')] statements = sql_destroy_indexes(app_config.models_module, self.style, connection) return '\n'.join(statements)