Permalink
Browse files

Cripple migrations so they work. Should be undone when upstream fixes…

… migrations properly.
  • Loading branch information...
Almad committed Aug 15, 2010
1 parent c8707cf commit f1b9e03d7c995028389ddf41d31e0ac6c3d99540
@@ -118,6 +118,13 @@ def backwards(self, orm):
models = {
+ 'contenttypes.contenttype': {
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
'core.category': {
'Meta': {'ordering': "('site','tree_path',)", 'unique_together': "(('site','tree_path'),)"},
'description': ('models.TextField', ['_("Category Description")'], {'blank': 'True'}),
@@ -173,11 +180,6 @@ def backwards(self, orm):
'_stub': True,
'id': ('models.AutoField', [], {'primary_key': 'True'})
},
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label','model'),)", 'db_table': "'django_content_type'"},
- '_stub': True,
- 'id': ('models.AutoField', [], {'primary_key': 'True'})
- },
'core.source': {
'Meta': {'ordering': "('name',)"},
'description': ('models.TextField', ["_('Description')"], {'blank': 'True'}),
@@ -8,23 +8,26 @@ def forwards(self, orm):
db.alter_column('core_placement', 'publishable_id', models.ForeignKey(orm['core.Publishable'], null=False))
db.create_index('core_placement', ['publishable_id'])
- db.delete_unique('core_placement', ('target_ct_id', 'target_id', 'category_id'))
+# db.delete_unique('core_placement', ('target_ct_id', 'target_id', 'category_id'))
db.delete_column('core_placement', 'target_ct_id')
db.delete_column('core_placement', 'target_id')
def backwards(self, orm):
- db.add_column('core_placement', 'target_ct', models.ForeignKey(orm['contenttypes.ContentType'], null=True))
- db.add_column('core_placement', 'target_id', models.IntegerField(null=True))
-
- db.drop_index('core_placement', ['publishable_id'])
- db.alter_column('core_placement', 'publishable_id', models.IntegerField(null=True))
+ pass
+# db.add_column('core_placement', 'target_ct', models.ForeignKey(orm['contenttypes.ContentType'], null=True))
+# db.add_column('core_placement', 'target_id', models.IntegerField(null=True))
+#
+# db.drop_index('core_placement', ['publishable_id'])
+# db.alter_column('core_placement', 'publishable_id', models.IntegerField(null=True))
models = {
'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label','model'),)", 'db_table': "'django_content_type'"},
- '_stub': True,
- 'id': ('models.AutoField', [], {'primary_key': 'True'})
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'core.publishable': {
'Meta': {'app_label': "'core'"},
@@ -6,15 +6,16 @@
class Migration:
def forwards(self, orm):
+ pass
# Adding model 'Related'
- db.create_table('core_related', (
- ('id', models.AutoField(primary_key=True)),
- ('publishable', models.ForeignKey(orm.Publishable, verbose_name=_('Publishable'))),
- ('related_ct', models.ForeignKey(orm['contenttypes.ContentType'], verbose_name=_('Content type'))),
- ('related_id', models.IntegerField(_('Object ID'))),
- ))
- db.send_create_signal('core', ['Related'])
+# db.create_table('core_related', (
+# ('id', models.AutoField(primary_key=True)),
+# ('publishable', models.ForeignKey(orm.Publishable, verbose_name=_('Publishable'))),
+# ('related_ct', models.ForeignKey(orm['contenttypes.ContentType'], verbose_name=_('Content type'))),
+# ('related_id', models.IntegerField(_('Object ID'))),
+# ))
+# db.send_create_signal('core', ['Related'])
@@ -3,4 +3,10 @@ class Migration:
"""
South 0.7+ picking up this as migration, object must be present.
Ugly monkey/puke patch until upstream fixes migrations for the rest of the world.
- """
+ """
+
+ def forwards(self, *args, **kwargs):
+ pass
+
+ def backwards(self, *args, **kwargs):
+ pass
@@ -153,9 +153,11 @@ def generic_relations(self):
return [dict(zip(keys, v)) for v in gens]
def backwards(self, orm):
+ self.orm = orm
pass
def forwards(self, orm):
+ self.orm = orm
# migrate publishables
self.forwards_publishable(orm)
# migrate generic relations

0 comments on commit f1b9e03

Please sign in to comment.