diff options
author | Dan McGee <dan@archlinux.org> | 2012-04-20 10:36:20 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-04-20 11:15:03 -0500 |
commit | c3a5f8a4e83983a352c45eeaa550cad315dddcb7 (patch) | |
tree | bfb9e4dab98d3d61d86b912c20d86edaf9476176 /main/migrations | |
parent | d21d8be0186413fe1fa5fd6c859786465472ee10 (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 'main/migrations')
-rw-r--r-- | main/migrations/0030_move_mirror_models.py | 4 | ||||
-rw-r--r-- | main/migrations/0031_move_news_out.py | 4 | ||||
-rw-r--r-- | main/migrations/0034_update_content_type.py | 26 |
3 files changed, 5 insertions, 29 deletions
diff --git a/main/migrations/0030_move_mirror_models.py b/main/migrations/0030_move_mirror_models.py index 998ff6a2..1fe0c7e9 100644 --- a/main/migrations/0030_move_mirror_models.py +++ b/main/migrations/0030_move_mirror_models.py @@ -6,10 +6,6 @@ from django.db import models class Migration(SchemaMigration): - depends_on = ( - ('mirrors', '0002_rename_model_tables'), - ) - def forwards(self, orm): pass diff --git a/main/migrations/0031_move_news_out.py b/main/migrations/0031_move_news_out.py index a730f4f3..28f4b750 100644 --- a/main/migrations/0031_move_news_out.py +++ b/main/migrations/0031_move_news_out.py @@ -6,10 +6,6 @@ from django.db import models class Migration(SchemaMigration): - depends_on = ( - ('news', '0002_move_news_in'), - ) - def forwards(self, orm): pass diff --git a/main/migrations/0034_update_content_type.py b/main/migrations/0034_update_content_type.py index 779021da..59c6f6ad 100644 --- a/main/migrations/0034_update_content_type.py +++ b/main/migrations/0034_update_content_type.py @@ -5,31 +5,15 @@ from south.v2 import DataMigration from django.db import models class Migration(DataMigration): - - depends_on = ( - ('mirrors', '0002_rename_model_tables'), - ('news', '0002_move_news_in'), - ) - - mirror_apps = [ 'mirror', 'mirrorprotocol', 'mirrorurl', 'mirrorrsync' ] + '''This is a defunct migration now, things have been moved to their proper + places, but removing it would cause all existing setups migrated past this + to complain.''' def forwards(self, orm): - ct = orm['contenttypes.ContentType'].objects - - # somehow these got in there already; remove them in favor of the old - ct.filter(app_label='news').delete() - ct.filter(app_label='mirrors').delete() - - ct.filter(app_label='main', model='news').update(app_label='news') - ct.filter(app_label='main', model__in=self.mirror_apps).update( - app_label='mirrors') + pass def backwards(self, orm): - ct = orm['contenttypes.ContentType'].objects - - ct.filter(app_label='mirrors', model__in=self.mirror_apps).update( - app_label='main') - ct.filter(app_label='news', model='news').update(app_label='main') + pass models = { 'auth.group': { |