summaryrefslogtreecommitdiffstats
path: root/askbot/migrations
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2012-12-24 21:39:27 +0000
committerMonty Taylor <mordred@inaugust.com>2012-12-24 21:47:24 +0000
commit13823c0ed6e0ec54e3068efa62b2fe889ef8d799 (patch)
tree2231afd50ad8b269190cdda81aa84dc42f0f0663 /askbot/migrations
parentcab49ee6f0a896fe51d15a0af0978b340a3b03a8 (diff)
downloadaskbot-13823c0ed6e0ec54e3068efa62b2fe889ef8d799.tar.gz
askbot-13823c0ed6e0ec54e3068efa62b2fe889ef8d799.tar.bz2
askbot-13823c0ed6e0ec54e3068efa62b2fe889ef8d799.zip
Make column changes actually work with InnoDB
Diffstat (limited to 'askbot/migrations')
-rw-r--r--askbot/migrations/__init__.py5
1 files changed, 5 insertions, 0 deletions
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()