3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
7 class Migration(SchemaMigration):
9 def forwards(self, orm):
11 # Deleting field 'ManyToManyValue.object_ids'
12 db.delete_column('philo_manytomanyvalue', 'object_ids')
14 # Adding M2M table for field values on 'ManyToManyValue'
15 db.create_table('philo_manytomanyvalue_values', (
16 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
17 ('manytomanyvalue', models.ForeignKey(orm['philo.manytomanyvalue'], null=False)),
18 ('foreignkeyvalue', models.ForeignKey(orm['philo.foreignkeyvalue'], null=False))
20 db.create_unique('philo_manytomanyvalue_values', ['manytomanyvalue_id', 'foreignkeyvalue_id'])
23 def backwards(self, orm):
25 # Adding field 'ManyToManyValue.object_ids'
26 db.add_column('philo_manytomanyvalue', 'object_ids', self.gf('django.db.models.fields.CommaSeparatedIntegerField')(max_length=300, null=True, blank=True), keep_default=False)
28 # Removing M2M table for field values on 'ManyToManyValue'
29 db.delete_table('philo_manytomanyvalue_values')
33 'contenttypes.contenttype': {
34 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
35 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
36 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
37 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
38 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
41 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
42 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
43 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
44 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
46 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
47 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
50 'Meta': {'object_name': 'Collection'},
51 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
52 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
53 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
55 'philo.collectionmember': {
56 'Meta': {'object_name': 'CollectionMember'},
57 'collection': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['philo.Collection']"}),
58 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59 'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
60 'member_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
61 'member_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
64 'Meta': {'object_name': 'Contentlet'},
65 'content': ('philo.models.fields.TemplateField', [], {}),
66 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
67 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
68 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentlets'", 'to': "orm['philo.Page']"})
70 'philo.contentreference': {
71 'Meta': {'object_name': 'ContentReference'},
72 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
73 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
74 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
75 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
76 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentreferences'", 'to': "orm['philo.Page']"})
79 'Meta': {'object_name': 'File'},
80 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
81 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
82 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255'})
84 'philo.foreignkeyvalue': {
85 'Meta': {'object_name': 'ForeignKeyValue'},
86 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'foreign_key_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
87 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
88 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
91 'Meta': {'object_name': 'JSONValue'},
92 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93 'value': ('philo.models.fields.JSONField', [], {})
95 'philo.manytomanyvalue': {
96 'Meta': {'object_name': 'ManyToManyValue'},
97 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'many_to_many_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
98 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
99 'values': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.ForeignKeyValue']", 'null': 'True', 'blank': 'True'})
102 'Meta': {'object_name': 'Node'},
103 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
104 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
105 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
106 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
107 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
110 'Meta': {'object_name': 'Page'},
111 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
112 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
113 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
116 'Meta': {'object_name': 'Redirect'},
117 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
118 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
119 'target': ('django.db.models.fields.CharField', [], {'max_length': '200'})
122 'Meta': {'object_name': 'Tag'},
123 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
124 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
125 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
128 'Meta': {'object_name': 'Template'},
129 'code': ('philo.models.fields.TemplateField', [], {}),
130 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
131 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
132 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
133 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
134 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
135 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'})
139 complete_apps = ['philo']