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 # Adding model 'ManyToManyValue'
12 db.create_table('philo_manytomanyvalue', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='many_to_many_value_set', null=True, to=orm['contenttypes.ContentType'])),
15 ('object_ids', self.gf('django.db.models.fields.CommaSeparatedIntegerField')(max_length=300, null=True, blank=True)),
17 db.send_create_signal('philo', ['ManyToManyValue'])
19 # Adding model 'JSONValue'
20 db.create_table('philo_jsonvalue', (
21 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
22 ('value', self.gf('philo.models.fields.JSONField')()),
24 db.send_create_signal('philo', ['JSONValue'])
26 # Adding model 'ForeignKeyValue'
27 db.create_table('philo_foreignkeyvalue', (
28 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
29 ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='foreign_key_value_set', null=True, to=orm['contenttypes.ContentType'])),
30 ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
32 db.send_create_signal('philo', ['ForeignKeyValue'])
34 # Adding field 'Attribute.value_content_type'
35 db.add_column('philo_attribute', 'value_content_type', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='attribute_value_set', null=True, to=orm['contenttypes.ContentType']), keep_default=False)
37 # Adding field 'Attribute.value_object_id'
38 db.add_column('philo_attribute', 'value_object_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True), keep_default=False)
40 # Adding unique constraint on 'Attribute', fields ['value_object_id', 'value_content_type']
41 db.create_unique('philo_attribute', ['value_object_id', 'value_content_type_id'])
44 def backwards(self, orm):
46 # Deleting model 'ManyToManyValue'
47 db.delete_table('philo_manytomanyvalue')
49 # Deleting model 'JSONValue'
50 db.delete_table('philo_jsonvalue')
52 # Deleting model 'ForeignKeyValue'
53 db.delete_table('philo_foreignkeyvalue')
55 # Deleting field 'Attribute.value_content_type'
56 db.delete_column('philo_attribute', 'value_content_type_id')
58 # Deleting field 'Attribute.value_object_id'
59 db.delete_column('philo_attribute', 'value_object_id')
61 # Removing unique constraint on 'Attribute', fields ['value_object_id', 'value_content_type']
62 db.delete_unique('philo_attribute', ['value_object_id', 'value_content_type_id'])
66 'contenttypes.contenttype': {
67 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
68 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
69 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
71 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
74 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
75 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
76 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
77 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
78 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
79 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
80 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
81 'value': ('philo.models.fields.JSONField', [], {})
84 'Meta': {'object_name': 'Collection'},
85 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
86 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
87 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
89 'philo.collectionmember': {
90 'Meta': {'object_name': 'CollectionMember'},
91 'collection': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['philo.Collection']"}),
92 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93 'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
94 'member_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
95 'member_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
98 'Meta': {'object_name': 'Contentlet'},
99 'content': ('philo.models.fields.TemplateField', [], {}),
100 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
101 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
102 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentlets'", 'to': "orm['philo.Page']"})
104 'philo.contentreference': {
105 'Meta': {'object_name': 'ContentReference'},
106 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
107 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
108 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
110 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentreferences'", 'to': "orm['philo.Page']"})
113 'Meta': {'object_name': 'File'},
114 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
115 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
116 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255'})
118 'philo.foreignkeyvalue': {
119 'Meta': {'object_name': 'ForeignKeyValue'},
120 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'foreign_key_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
121 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
122 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
125 'Meta': {'object_name': 'JSONValue'},
126 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
127 'value': ('philo.models.fields.JSONField', [], {})
129 'philo.manytomanyvalue': {
130 'Meta': {'object_name': 'ManyToManyValue'},
131 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'many_to_many_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
132 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
133 'object_ids': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'})
136 'Meta': {'object_name': 'Node'},
137 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
138 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
139 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
140 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
141 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
144 'Meta': {'object_name': 'Page'},
145 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
146 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
147 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
150 'Meta': {'object_name': 'Redirect'},
151 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
152 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
153 'target': ('django.db.models.fields.CharField', [], {'max_length': '200'})
155 'philo.relationship': {
156 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'),)", 'object_name': 'Relationship'},
157 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'relationship_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
158 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
159 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
160 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
161 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'relationship_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
162 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
165 'Meta': {'object_name': 'Tag'},
166 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
167 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
168 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
171 'Meta': {'object_name': 'Template'},
172 'code': ('philo.models.fields.TemplateField', [], {}),
173 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
174 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
175 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
176 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
177 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
178 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'})
182 complete_apps = ['philo']