summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/mysql/base.py')
-rw-r--r--django/db/backends/mysql/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 7f5fa8d00e..6e9a5f0e46 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -242,6 +242,9 @@ def get_sql_sequence_reset(style, model_list):
# No sequence reset required
return []
+def get_change_table_name_sql( table_name, old_table_name ):
+ return 'ALTER TABLE '+ quote_name(old_table_name) +' RENAME TO '+ quote_name(table_name) + ';'
+
def get_change_column_name_sql( table_name, indexes, old_col_name, new_col_name, col_def ):
# mysql doesn't support column renames (AFAIK), so we fake it
# TODO: only supports a single primary key so far