diff options
| author | Derek Anderson <public@kered.org> | 2007-08-01 17:51:59 +0000 |
|---|---|---|
| committer | Derek Anderson <public@kered.org> | 2007-08-01 17:51:59 +0000 |
| commit | 0b4c2c7ab1b32d5fa1befd86207d8ead52d6e4f7 (patch) | |
| tree | 69b36c684f4f35cca0effae13b7066bcb5ed7be1 /django/db/backends/mysql/base.py | |
| parent | 4629092d792a38ad493361490252b77576262f53 (diff) | |
schema-evolution:
fixed postgresql constraint lookup after a table rename bug
pulled table renames into the backends
added postgresql unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/schema-evolution@5784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/mysql/base.py')
| -rw-r--r-- | django/db/backends/mysql/base.py | 3 |
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 |
