Commit a9b7f31b authored by Ramiro Morales's avatar Ramiro Morales
Browse files

Completed long overdue sqlinitialdata deprecation.

parent c1b412eb
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
from django.core.management.base import AppCommand, CommandError


class Command(AppCommand):
    help = "RENAMED: see 'sqlcustom'"

    def handle(self, *apps, **options):
        raise CommandError("This command has been renamed. Use the 'sqlcustom' command instead.")
+0 −3
Original line number Diff line number Diff line
@@ -98,9 +98,6 @@ Prints the SQL statements that would be executed for the "flush" command.
.BI "sqlindexes [" "app_label ..." "]"
Prints the CREATE INDEX SQL statements for the given model module name(s).
.TP
.BI "sqlinitialdata [" "app_label ..." "]"
Prints the initial INSERT SQL statements for the given app name(s).
.TP
.BI "sqlsequencereset [" "app_label ..." "]"
Prints the SQL statements for resetting PostgreSQL sequences for the
given app name(s).
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ class BashCompletionTests(unittest.TestCase):
        "Subcommands can be autocompleted"
        self._user_input('django-admin.py sql')
        output = self._run_autocomplete()
        self.assertEqual(output, ['sql sqlall sqlclear sqlcustom sqldropindexes sqlflush sqlindexes sqlinitialdata sqlmigrate sqlsequencereset'])
        self.assertEqual(output, ['sql sqlall sqlclear sqlcustom sqldropindexes sqlflush sqlindexes sqlmigrate sqlsequencereset'])

    def test_help(self):
        "No errors, just an empty list if there are no autocomplete options"