mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Refactored get_sql_sequence_reset() to DatabaseOperations.sequence_reset_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -15,7 +15,7 @@ class Command(BaseCommand):
|
||||
def handle(self, *fixture_labels, **options):
|
||||
from django.db.models import get_apps
|
||||
from django.core import serializers
|
||||
from django.db import connection, transaction, backend
|
||||
from django.db import connection, transaction
|
||||
from django.conf import settings
|
||||
|
||||
self.style = no_style()
|
||||
@@ -105,7 +105,7 @@ class Command(BaseCommand):
|
||||
(format, fixture_name, humanize(fixture_dir))
|
||||
|
||||
if count[0] > 0:
|
||||
sequence_sql = backend.get_sql_sequence_reset(self.style, models)
|
||||
sequence_sql = connection.ops.sequence_reset_sql(self.style, models)
|
||||
if sequence_sql:
|
||||
if verbosity > 1:
|
||||
print "Resetting sequences"
|
||||
|
||||
@@ -5,5 +5,5 @@ class Command(AppCommand):
|
||||
output_transaction = True
|
||||
|
||||
def handle_app(self, app, **options):
|
||||
from django.db import backend, models
|
||||
return '\n'.join(backend.get_sql_sequence_reset(self.style, models.get_models(app)))
|
||||
from django.db import connection, models
|
||||
return '\n'.join(connection.ops.sequence_reset_sql(self.style, models.get_models(app)))
|
||||
|
||||
Reference in New Issue
Block a user