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 model 'Relationship'
12 db.delete_table('philo_relationship')
14 # Deleting field 'Attribute.value'
15 db.delete_column('philo_attribute', 'value_json')
18 def backwards(self, orm):
20 # Adding model 'Relationship'
21 db.create_table('philo_relationship', (
22 ('key', self.gf('django.db.models.fields.CharField')(max_length=255)),
23 ('entity_content_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='relationship_entity_set', to=orm['contenttypes.ContentType'])),
24 ('entity_object_id', self.gf('django.db.models.fields.PositiveIntegerField')()),
25 ('value_object_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
26 ('value_content_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='relationship_value_set', null=True, to=orm['contenttypes.ContentType'], blank=True)),
27 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
29 db.send_create_signal('philo', ['Relationship'])
31 # Adding field 'Attribute.value'
32 db.add_column('philo_attribute', 'value', self.gf('philo.models.fields.JSONField')(default='null'), keep_default=False)
36 'contenttypes.contenttype': {
37 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
38 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
39 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
40 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
41 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
44 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
45 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
46 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
47 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
48 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
49 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
50 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
53 'Meta': {'object_name': 'Collection'},
54 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
55 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
56 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
58 'philo.collectionmember': {
59 'Meta': {'object_name': 'CollectionMember'},
60 'collection': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['philo.Collection']"}),
61 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62 'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
63 'member_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
64 'member_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
67 'Meta': {'object_name': 'Contentlet'},
68 'content': ('philo.models.fields.TemplateField', [], {}),
69 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
71 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentlets'", 'to': "orm['philo.Page']"})
73 'philo.contentreference': {
74 'Meta': {'object_name': 'ContentReference'},
75 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
76 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
77 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
78 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
79 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentreferences'", 'to': "orm['philo.Page']"})
82 'Meta': {'object_name': 'File'},
83 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
84 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
85 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255'})
87 'philo.foreignkeyvalue': {
88 'Meta': {'object_name': 'ForeignKeyValue'},
89 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'foreign_key_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
90 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
91 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
94 'Meta': {'object_name': 'JSONValue'},
95 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
96 'value': ('philo.models.fields.JSONField', [], {})
98 'philo.manytomanyvalue': {
99 'Meta': {'object_name': 'ManyToManyValue'},
100 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'many_to_many_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
101 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102 'object_ids': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'})
105 'Meta': {'object_name': 'Node'},
106 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
107 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
108 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
109 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
110 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
113 'Meta': {'object_name': 'Page'},
114 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
115 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
116 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
119 'Meta': {'object_name': 'Redirect'},
120 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
121 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
122 'target': ('django.db.models.fields.CharField', [], {'max_length': '200'})
125 'Meta': {'object_name': 'Tag'},
126 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
127 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
128 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
131 'Meta': {'object_name': 'Template'},
132 'code': ('philo.models.fields.TemplateField', [], {}),
133 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
134 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
135 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
136 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
137 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
138 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'})
142 complete_apps = ['philo']