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 index on 'Contentlet', fields ['name']
12 db.create_index('philo_contentlet', ['name'])
14 # Adding index on 'JSONValue', fields ['value']
15 db.create_index('philo_jsonvalue', ['value_json'])
17 # Adding index on 'ForeignKeyValue', fields ['object_id']
18 db.create_index('philo_foreignkeyvalue', ['object_id'])
20 # Adding index on 'ContentReference', fields ['name']
21 db.create_index('philo_contentreference', ['name'])
24 def backwards(self, orm):
26 # Removing index on 'ContentReference', fields ['name']
27 db.delete_index('philo_contentreference', ['name'])
29 # Removing index on 'ForeignKeyValue', fields ['object_id']
30 db.delete_index('philo_foreignkeyvalue', ['object_id'])
32 # Removing index on 'JSONValue', fields ['value']
33 db.delete_index('philo_jsonvalue', ['value_json'])
35 # Removing index on 'Contentlet', fields ['name']
36 db.delete_index('philo_contentlet', ['name'])
40 'contenttypes.contenttype': {
41 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
42 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
43 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
44 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
45 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
48 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
49 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
50 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
51 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
52 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
53 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
54 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
57 'Meta': {'object_name': 'Collection'},
58 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
59 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
60 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
62 'philo.collectionmember': {
63 'Meta': {'object_name': 'CollectionMember'},
64 'collection': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['philo.Collection']"}),
65 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
66 'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
67 'member_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
68 'member_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
71 'Meta': {'object_name': 'Contentlet'},
72 'content': ('philo.models.fields.TemplateField', [], {}),
73 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
74 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
75 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentlets'", 'to': "orm['philo.Page']"})
77 'philo.contentreference': {
78 'Meta': {'object_name': 'ContentReference'},
79 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
80 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
81 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
82 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
83 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentreferences'", 'to': "orm['philo.Page']"})
86 'Meta': {'object_name': 'File'},
87 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
88 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
89 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255'})
91 'philo.foreignkeyvalue': {
92 'Meta': {'object_name': 'ForeignKeyValue'},
93 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
94 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
95 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
98 'Meta': {'object_name': 'JSONValue'},
99 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
100 'value': ('philo.models.fields.JSONField', [], {'default': "'null'", 'db_index': 'True'})
102 'philo.manytomanyvalue': {
103 'Meta': {'object_name': 'ManyToManyValue'},
104 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
105 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
106 'values': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.ForeignKeyValue']", 'null': 'True', 'blank': 'True'})
109 'Meta': {'object_name': 'Node'},
110 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
111 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
112 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
113 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
114 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
115 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
116 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
117 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
118 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
121 'Meta': {'object_name': 'Page'},
122 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
123 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
124 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
127 'Meta': {'object_name': 'Redirect'},
128 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
129 'reversing_parameters': ('philo.models.fields.JSONField', [], {'blank': 'True'}),
130 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
131 'target_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'philo_redirect_related'", 'null': 'True', 'to': "orm['philo.Node']"}),
132 'url_or_subpath': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'})
135 'Meta': {'ordering': "('name',)", 'object_name': 'Tag'},
136 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
137 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
138 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
141 'Meta': {'object_name': 'Template'},
142 'code': ('philo.models.fields.TemplateField', [], {}),
143 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
144 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
145 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
146 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
147 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
148 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
149 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
150 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
151 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
152 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
156 complete_apps = ['philo']