summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-06-06 13:23:12 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-06-06 13:23:12 -0400
commit07e2161a6e182313b6f39aa0515cd5c6cd2e2099 (patch)
treeafad1c023c64ebd220de1daae668a64297b332c1
parent8a6373c47ab62499c8be489c35231b8bea0d00a5 (diff)
downloadaskbot-07e2161a6e182313b6f39aa0515cd5c6cd2e2099.tar.gz
askbot-07e2161a6e182313b6f39aa0515cd5c6cd2e2099.tar.bz2
askbot-07e2161a6e182313b6f39aa0515cd5c6cd2e2099.zip
a small change in the migrations
-rw-r--r--askbot/migrations/__init__.py2
-rw-r--r--askbot/migrations_api/__init__.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/askbot/migrations/__init__.py b/askbot/migrations/__init__.py
index b9683daf..89f7c5e2 100644
--- a/askbot/migrations/__init__.py
+++ b/askbot/migrations/__init__.py
@@ -2,7 +2,7 @@ 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:
+if db.backend_name == 'mysql' and not db.has_ddl_transactions:
SchemaMigration.no_dry_run = True
# Terminal ANSI codes for printing colored text:
diff --git a/askbot/migrations_api/__init__.py b/askbot/migrations_api/__init__.py
index 5a65f9cf..a9b20a69 100644
--- a/askbot/migrations_api/__init__.py
+++ b/askbot/migrations_api/__init__.py
@@ -13,7 +13,7 @@ def safe_add_column(table, column, column_data, keep_default = False):
so, we need to add these columns here in separate transactions
and roll back if they fail, if we want we could also record - which columns clash
"""
- if db.backend_name in ('mysql', 'postgres'):
+ if db.backend_name == 'mysql':
if len(db.execute('select column_name from information_schema.columns where table_name=%s and column_name=%s', params=[table, column])) == 0:
db.add_column(table, column, column_data, keep_default = keep_default)
else: