summaryrefslogtreecommitdiffstats
path: root/askbot/migrations_api/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/migrations_api/__init__.py')
-rw-r--r--askbot/migrations_api/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/askbot/migrations_api/__init__.py b/askbot/migrations_api/__init__.py
index 2e172a99..5a65f9cf 100644
--- a/askbot/migrations_api/__init__.py
+++ b/askbot/migrations_api/__init__.py
@@ -13,10 +13,9 @@ 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=='mysql':
+ if db.backend_name in ('mysql', 'postgres'):
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:
try:
db.start_transaction()