diff options
| author | Víðir Valberg Guðmundsson <valberg@orn.li> | 2014-05-29 23:03:10 +0200 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-06-07 17:18:30 -0700 |
| commit | f70f669941775ceef8433f4c66b189f82d53074f (patch) | |
| tree | a1166430f3a077ad09f2d4fc4d5cdacff1d3232e /django/core/management/commands/sqlsequencereset.py | |
| parent | 6fd455adfcc85f6bd390bce784a1b5dfe5d610ea (diff) | |
Fixed #22749: Making SQL management commands migration aware.
Diffstat (limited to 'django/core/management/commands/sqlsequencereset.py')
| -rw-r--r-- | django/core/management/commands/sqlsequencereset.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/core/management/commands/sqlsequencereset.py b/django/core/management/commands/sqlsequencereset.py index 9d25125efb..4f7ce4492a 100644 --- a/django/core/management/commands/sqlsequencereset.py +++ b/django/core/management/commands/sqlsequencereset.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals from optparse import make_option from django.core.management.base import AppCommand +from django.core.management.sql import check_for_migrations from django.db import connections, DEFAULT_DB_ALIAS @@ -22,6 +23,7 @@ class Command(AppCommand): if app_config.models_module is None: return connection = connections[options.get('database')] + check_for_migrations(app_config, connection) models = app_config.get_models(include_auto_created=True) statements = connection.ops.sequence_reset_sql(self.style, models) return '\n'.join(statements) |
