summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-04-20 10:36:20 -0500
committerDan McGee <dan@archlinux.org>2012-04-20 11:15:03 -0500
commitc3a5f8a4e83983a352c45eeaa550cad315dddcb7 (patch)
treebfb9e4dab98d3d61d86b912c20d86edaf9476176 /news
parentd21d8be0186413fe1fa5fd6c859786465472ee10 (diff)
Fix ContentType related migrations
This should fix the issues reported in FS#23228 for the most part. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news')
-rw-r--r--news/migrations/0002_move_news_in.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/news/migrations/0002_move_news_in.py b/news/migrations/0002_move_news_in.py
index d6dafad4..43d68df4 100644
--- a/news/migrations/0002_move_news_in.py
+++ b/news/migrations/0002_move_news_in.py
@@ -7,14 +7,19 @@ from django.db import models
class Migration(SchemaMigration):
depends_on = (
- ('main', '0001_initial'),
+ ('main', '0031_move_news_out'),
)
def forwards(self, orm):
- pass
+ db.send_create_signal('news', ['News'])
+ if not db.dry_run:
+ ct = orm['contenttypes.ContentType'].objects
+ ct.filter(app_label='main', model='news').update(app_label='news')
def backwards(self, orm):
- pass
+ if not db.dry_run:
+ ct = orm['contenttypes.ContentType'].objects
+ ct.filter(app_label='news', model='news').update(app_label='main')
models = {
'auth.group': {