From e815a7c7336aff065dc7894d769e9cd5170b790d Mon Sep 17 00:00:00 2001 From: Tomasz Zielinski Date: Tue, 10 Jan 2012 13:50:50 +0100 Subject: Fixed migration 0068 --- askbot/migrations/0068_transplant_last_activity_fields_1.py | 3 ++- askbot/migrations/0070_transplant_last_activity_fields_2.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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): -- cgit v1.2.3-1-g7c22