summaryrefslogtreecommitdiffstats
path: root/askbot/migrations_api
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-18 17:01:25 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-18 17:01:25 -0400
commitd8c46189852e43d6ba4f59367933919ae4c9c08d (patch)
tree324667cf8e985e6c39a8801e977b9d70ec9adfb9 /askbot/migrations_api
parent84d8999fedae759887d4dae3cb0e13c2b16ff4f7 (diff)
downloadaskbot-d8c46189852e43d6ba4f59367933919ae4c9c08d.tar.gz
askbot-d8c46189852e43d6ba4f59367933919ae4c9c08d.tar.bz2
askbot-d8c46189852e43d6ba4f59367933919ae4c9c08d.zip
hopefully fixed postgresql migrations
Diffstat (limited to 'askbot/migrations_api')
-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()