1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +00:00

boulder-oracle-sprint: Fixed sqlclear trying to drop sequences for

tables without AutoFields.  Fixed output of sql, sqlall, sqlreset, and 
sqlflush for piping to SQL*Plus.


git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Boulder Sprinters
2007-05-02 16:30:00 +00:00
parent 90740c93e6
commit 750d2e8c3c
2 changed files with 10 additions and 5 deletions

View File

@@ -371,7 +371,7 @@ def get_sql_delete(app):
style.SQL_KEYWORD(backend.get_drop_foreignkey_sql()),
style.SQL_FIELD(truncate_name(r_name, backend.get_max_name_length()))))
del references_to_delete[model]
if hasattr(backend, 'get_drop_sequence'):
if model._meta.has_auto_field and hasattr(backend, 'get_drop_sequence'):
output.append(backend.get_drop_sequence(model._meta.db_table))
# Output DROP TABLE statements for many-to-many tables.