Author: bouldersprinters
Date: 2007-04-18 18:23:50 -0500 (Wed, 18 Apr 2007)
New Revision: 5028
Modified:
django/branches/boulder-oracle-sprint/django/core/management.py
django/branches/boulder-oracle-sprint/django/db/backends/oracle/base.py
Log:
boulder-oracle-sprint: Added Oracle DROP SEQUENCE emission to the sqlclear
command.
Modified: django/branches/boulder-oracle-sprint/django/core/management.py
===================================================================
--- django/branches/boulder-oracle-sprint/django/core/management.py
2007-04-18 22:40:53 UTC (rev 5027)
+++ django/branches/boulder-oracle-sprint/django/core/management.py
2007-04-18 23:23:50 UTC (rev 5028)
@@ -369,8 +369,8 @@
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'):
-
output.append(backend.get_drop_sequence(model._meta.db_table))
+ if hasattr(backend, 'get_drop_sequence'):
+ output.append(backend.get_drop_sequence(model._meta.db_table))
# Output DROP TABLE statements for many-to-many tables.
for model in app_models:
Modified:
django/branches/boulder-oracle-sprint/django/db/backends/oracle/base.py
===================================================================
--- django/branches/boulder-oracle-sprint/django/db/backends/oracle/base.py
2007-04-18 22:40:53 UTC (rev 5027)
+++ django/branches/boulder-oracle-sprint/django/db/backends/oracle/base.py
2007-04-18 23:23:50 UTC (rev 5028)
@@ -187,6 +187,9 @@
END;\n""" % (tr_name, quote_name(table), sq_name)
return sequence_sql, trigger_sql
+def get_drop_sequence(table):
+ return "DROP SEQUENCE %s;" % quote_name(get_sequence_name(table))
+
def _get_sequence_reset_sql():
# TODO: colorize this SQL code with style.SQL_KEYWORD(), etc.
return """
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---