From 13823c0ed6e0ec54e3068efa62b2fe889ef8d799 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 24 Dec 2012 21:39:27 +0000 Subject: Make column changes actually work with InnoDB --- askbot/migrations/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/askbot/migrations/__init__.py b/askbot/migrations/__init__.py index 86377b7b..b9683daf 100644 --- a/askbot/migrations/__init__.py +++ b/askbot/migrations/__init__.py @@ -1,5 +1,9 @@ from south.db import db from south.utils import ask_for_it_by_name +from south.v2 import SchemaMigration + +if not db.has_ddl_transactions: + SchemaMigration.no_dry_run = True # Terminal ANSI codes for printing colored text: # - http://code.google.com/p/testoob/source/browse/trunk/src/testoob/reporting/colored.py#20 @@ -67,3 +71,4 @@ def innodb_ready_rename_column(orm, models, table, old_column_name, new_column_n # INFO: ask_for_it_by_name() if equivalent to self.gf() which is usually used in migrations, e.g.: # db.alter_column('askbot_badgedata', 'slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)) db.alter_column(table, new_column_name, field) + db.clear_deferred_sql() -- cgit v1.2.3-1-g7c22