summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/migrations/0068_transplant_last_activity_fields_1.py3
-rw-r--r--askbot/migrations/0070_transplant_last_activity_fields_2.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/askbot/migrations/0068_transplant_last_activity_fields_1.py b/askbot/migrations/0068_transplant_last_activity_fields_1.py
index 3f7b23d0..14ad665b 100644
--- a/askbot/migrations/0068_transplant_last_activity_fields_1.py
+++ b/askbot/migrations/0068_transplant_last_activity_fields_1.py
@@ -12,7 +12,8 @@ class Migration(SchemaMigration):
db.add_column('askbot_thread', 'last_activity_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now), keep_default=False)
# Adding field 'Thread.last_activity_by'
- db.add_column('askbot_thread', 'last_activity_by', self.gf('django.db.models.fields.related.ForeignKey')(default=0, related_name='unused_last_active_in_threads', to=orm['auth.User']), keep_default=False)
+ # HACK: Manually added null=True to fix migrations, to be manually removed in 0070
+ db.add_column('askbot_thread', 'last_activity_by', self.gf('django.db.models.fields.related.ForeignKey')(null=True, default=None, related_name='unused_last_active_in_threads', to=orm['auth.User']), keep_default=False)
def backwards(self, orm):
diff --git a/askbot/migrations/0070_transplant_last_activity_fields_2.py b/askbot/migrations/0070_transplant_last_activity_fields_2.py
index b4802271..a4ba6b6a 100644
--- a/askbot/migrations/0070_transplant_last_activity_fields_2.py
+++ b/askbot/migrations/0070_transplant_last_activity_fields_2.py
@@ -14,6 +14,10 @@ class Migration(SchemaMigration):
# Deleting field 'Question.last_activity_at'
db.delete_column(u'question', 'last_activity_at')
+ # HACK: Manually reversing `null=True` hack from 0068
+ db.alter_column('askbot_thread', 'last_activity_by_id', self.gf('django.db.models.fields.related.ForeignKey')(related_name='unused_last_active_in_threads', to=orm['auth.User']))
+
+
def backwards(self, orm):