diff options
Diffstat (limited to 'askbot/migrations/0001_initial.py')
-rw-r--r-- | askbot/migrations/0001_initial.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/askbot/migrations/0001_initial.py b/askbot/migrations/0001_initial.py index ec119f92..d11c8f2f 100644 --- a/askbot/migrations/0001_initial.py +++ b/askbot/migrations/0001_initial.py @@ -4,24 +4,10 @@ import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models +from askbot.migrations_api import safe_add_column app_dir_name = os.path.basename(os.path.dirname(os.path.dirname(__file__))) -def safe_add_column(table, column, column_data, keep_default = False): - """when user calls syncdb with askbot the first time - the auth_user table will be created together with the patched columns - 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 - """ - try: - db.start_transaction() - db.add_column(table, column, column_data, keep_default = keep_default) - db.commit_transaction() - return True - except: - db.rollback_transaction() - return False - class Migration(SchemaMigration): def forwards(self, orm): |