Show More
@@ -18,12 +18,6 b' class Migration(SchemaMigration):' | |||||
18 | )) |
|
18 | )) | |
19 | db.create_unique(m2m_table_name, ['from_post_id', 'to_post_id']) |
|
19 | db.create_unique(m2m_table_name, ['from_post_id', 'to_post_id']) | |
20 |
|
20 | |||
21 | for post in Post.objects.all(): |
|
|||
22 | if post.parent != NO_PARENT: |
|
|||
23 | parent = Post.objects.get(id=post.parent) |
|
|||
24 | parent.replies.add(post) |
|
|||
25 |
|
||||
26 |
|
||||
27 | def backwards(self, orm): |
|
21 | def backwards(self, orm): | |
28 | # Removing M2M table for field replies on 'Post' |
|
22 | # Removing M2M table for field replies on 'Post' | |
29 | db.delete_table(db.shorten_name(u'boards_post_replies')) |
|
23 | db.delete_table(db.shorten_name(u'boards_post_replies')) |
General Comments 0
You need to be logged in to leave comments.
Login now