Ticket #14268: reset_sqlreset_warnings.diff

File reset_sqlreset_warnings.diff, 3.4 KB (added by laurentluce, 14 years ago)
  • django/core/management/commands/reset.py

     
    2020    output_transaction = True
    2121
    2222    def handle_app(self, app, **options):
     23        # This command breaks a lot and should be deprecated
     24        import warnings
     25        warnings.warn(
     26            'This command has been deprecated. The command ``flush`` can be used to delete everything. You can also use ALTER TABLE or DROP TABLE statements manually.',
     27            PendingDeprecationWarning
     28        )
    2329        using = options.get('database', DEFAULT_DB_ALIAS)
    2430        connection = connections[using]
    2531
  • django/core/management/sql.py

     
    101101
    102102def sql_reset(app, style, connection):
    103103    "Returns a list of the DROP TABLE SQL, then the CREATE TABLE SQL, for the given module."
     104    # This command breaks a lot and should be deprecated
     105    import warnings
     106    warnings.warn(
     107        'This command has been deprecated. The command ``sqlflush`` can be used to delete everything. You can also use ALTER TABLE or DROP TABLE statements manually.',
     108        PendingDeprecationWarning
     109    )
    104110    return sql_delete(app, style, connection) + sql_all(app, style, connection)
    105111
    106112def sql_flush(style, connection, only_django=False):
  • docs/releases/1.3.txt

     
    106106encouraged you redeploy your Django instances using :doc:`mod_wsgi
    107107</howto/deployment/modwsgi>`.
    108108
     109``reset`` and ``sqlreset`` management commands
     110~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     111   
     112Those commands have been deprecated. The ``flush`` and ``sqlflush`` commands
     113can be used to delete everything. You can also use ALTER TABLE or DROP TABLE
     114statements manually.
     115
     116
    109117What's new in Django 1.3
    110118========================
    111119
  • docs/ref/django-admin.txt

     
    7272    0.95
    7373    0.96
    7474    0.97-pre-SVN-6069
     75    1.3 pre-alpha SVN-13981
    7576
    7677Displaying debug output
    7778-----------------------
     
    514515reset <appname appname ...>
    515516---------------------------
    516517
     518.. deprecated:: 1.3
     519    This command has been deprecated. The ``flush`` can be used to delete
     520    everything. You can also use ALTER TABLE or DROP TABLE statements manually.
     521
    517522.. django-admin:: reset
    518523
    519524Executes the equivalent of ``sqlreset`` for the given app name(s).
    (this hunk was shorter than expected)  
    526531The :djadminopt:`--database` option can be used to specify the alias
    527532of the database to reset.
    528533
    529534runfcgi [options]
    530535-----------------
    531536
     
    729735sqlreset <appname appname ...>
    730736------------------------------
    731737
     738.. deprecated:: 1.3
     739    This command has been deprecated. The ``sqlflush`` can be used to delete
     740    everything. You can also use ALTER TABLE or DROP TABLE statements manually.
     741
    732742.. django-admin:: sqlreset
    733743
    734744Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).
Back to Top