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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user