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):
12 db.create_table('philo_tag', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
15 ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255, db_index=True)),
17 db.send_create_signal('philo', ['Tag'])
19 # Adding model 'Attribute'
20 db.create_table('philo_attribute', (
21 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
22 ('entity_content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
23 ('entity_object_id', self.gf('django.db.models.fields.PositiveIntegerField')()),
24 ('key', self.gf('django.db.models.fields.CharField')(max_length=255)),
25 ('json_value', self.gf('django.db.models.fields.TextField')()),
27 db.send_create_signal('philo', ['Attribute'])
29 # Adding unique constraint on 'Attribute', fields ['key', 'entity_content_type', 'entity_object_id']
30 db.create_unique('philo_attribute', ['key', 'entity_content_type_id', 'entity_object_id'])
32 # Adding model 'Relationship'
33 db.create_table('philo_relationship', (
34 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
35 ('entity_content_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='relationship_entity_set', to=orm['contenttypes.ContentType'])),
36 ('entity_object_id', self.gf('django.db.models.fields.PositiveIntegerField')()),
37 ('key', self.gf('django.db.models.fields.CharField')(max_length=255)),
38 ('value_content_type', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='relationship_value_set', null=True, to=orm['contenttypes.ContentType'])),
39 ('value_object_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
41 db.send_create_signal('philo', ['Relationship'])
43 # Adding unique constraint on 'Relationship', fields ['key', 'entity_content_type', 'entity_object_id']
44 db.create_unique('philo_relationship', ['key', 'entity_content_type_id', 'entity_object_id'])
46 # Adding model 'Collection'
47 db.create_table('philo_collection', (
48 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
49 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
50 ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
52 db.send_create_signal('philo', ['Collection'])
54 # Adding model 'CollectionMember'
55 db.create_table('philo_collectionmember', (
56 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
57 ('collection', self.gf('django.db.models.fields.related.ForeignKey')(related_name='members', to=orm['philo.Collection'])),
58 ('index', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
59 ('member_content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
60 ('member_object_id', self.gf('django.db.models.fields.PositiveIntegerField')()),
62 db.send_create_signal('philo', ['CollectionMember'])
65 db.create_table('philo_node', (
66 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
67 ('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['philo.Node'])),
68 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=255, db_index=True)),
69 ('view_content_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='node_view_set', to=orm['contenttypes.ContentType'])),
70 ('view_object_id', self.gf('django.db.models.fields.PositiveIntegerField')()),
72 db.send_create_signal('philo', ['Node'])
74 # Adding model 'Redirect'
75 db.create_table('philo_redirect', (
76 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
77 ('target', self.gf('django.db.models.fields.CharField')(max_length=200)),
78 ('status_code', self.gf('django.db.models.fields.IntegerField')(default=302)),
80 db.send_create_signal('philo', ['Redirect'])
83 db.create_table('philo_file', (
84 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
85 ('mimetype', self.gf('django.db.models.fields.CharField')(max_length=255)),
86 ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
88 db.send_create_signal('philo', ['File'])
90 # Adding model 'Template'
91 db.create_table('philo_template', (
92 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
93 ('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['philo.Template'])),
94 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=255, db_index=True)),
95 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
96 ('documentation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
97 ('mimetype', self.gf('django.db.models.fields.CharField')(default='text/html', max_length=255)),
98 ('code', self.gf('philo.models.fields.TemplateField')()),
100 db.send_create_signal('philo', ['Template'])
102 # Adding model 'Page'
103 db.create_table('philo_page', (
104 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
105 ('template', self.gf('django.db.models.fields.related.ForeignKey')(related_name='pages', to=orm['philo.Template'])),
106 ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
108 db.send_create_signal('philo', ['Page'])
110 # Adding model 'Contentlet'
111 db.create_table('philo_contentlet', (
112 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
113 ('page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='contentlets', to=orm['philo.Page'])),
114 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
115 ('content', self.gf('philo.models.fields.TemplateField')()),
117 db.send_create_signal('philo', ['Contentlet'])
119 # Adding model 'ContentReference'
120 db.create_table('philo_contentreference', (
121 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
122 ('page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='contentreferences', to=orm['philo.Page'])),
123 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
124 ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
125 ('content_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
127 db.send_create_signal('philo', ['ContentReference'])
130 def backwards(self, orm):
132 # Deleting model 'Tag'
133 db.delete_table('philo_tag')
135 # Deleting model 'Attribute'
136 db.delete_table('philo_attribute')
138 # Removing unique constraint on 'Attribute', fields ['key', 'entity_content_type', 'entity_object_id']
139 db.delete_unique('philo_attribute', ['key', 'entity_content_type_id', 'entity_object_id'])
141 # Deleting model 'Relationship'
142 db.delete_table('philo_relationship')
144 # Removing unique constraint on 'Relationship', fields ['key', 'entity_content_type', 'entity_object_id']
145 db.delete_unique('philo_relationship', ['key', 'entity_content_type_id', 'entity_object_id'])
147 # Deleting model 'Collection'
148 db.delete_table('philo_collection')
150 # Deleting model 'CollectionMember'
151 db.delete_table('philo_collectionmember')
153 # Deleting model 'Node'
154 db.delete_table('philo_node')
156 # Deleting model 'Redirect'
157 db.delete_table('philo_redirect')
159 # Deleting model 'File'
160 db.delete_table('philo_file')
162 # Deleting model 'Template'
163 db.delete_table('philo_template')
165 # Deleting model 'Page'
166 db.delete_table('philo_page')
168 # Deleting model 'Contentlet'
169 db.delete_table('philo_contentlet')
171 # Deleting model 'ContentReference'
172 db.delete_table('philo_contentreference')
176 'contenttypes.contenttype': {
177 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
178 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
179 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
180 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
181 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
184 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'),)", 'object_name': 'Attribute'},
185 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
186 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
187 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
188 'json_value': ('django.db.models.fields.TextField', [], {}),
189 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'})
191 'philo.collection': {
192 'Meta': {'object_name': 'Collection'},
193 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
194 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
195 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
197 'philo.collectionmember': {
198 'Meta': {'object_name': 'CollectionMember'},
199 'collection': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['philo.Collection']"}),
200 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
201 'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
202 'member_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
203 'member_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
205 'philo.contentlet': {
206 'Meta': {'object_name': 'Contentlet'},
207 'content': ('philo.models.fields.TemplateField', [], {}),
208 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
209 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
210 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentlets'", 'to': "orm['philo.Page']"})
212 'philo.contentreference': {
213 'Meta': {'object_name': 'ContentReference'},
214 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
215 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
216 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
217 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
218 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentreferences'", 'to': "orm['philo.Page']"})
221 'Meta': {'object_name': 'File'},
222 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
223 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
224 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255'})
227 'Meta': {'object_name': 'Node'},
228 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
229 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
230 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
231 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
232 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
235 'Meta': {'object_name': 'Page'},
236 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
237 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
238 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
241 'Meta': {'object_name': 'Redirect'},
242 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
243 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
244 'target': ('django.db.models.fields.CharField', [], {'max_length': '200'})
246 'philo.relationship': {
247 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'),)", 'object_name': 'Relationship'},
248 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'relationship_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
249 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
250 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
251 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
252 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'relationship_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
253 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
256 'Meta': {'object_name': 'Tag'},
257 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
258 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
259 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
262 'Meta': {'object_name': 'Template'},
263 'code': ('philo.models.fields.TemplateField', [], {}),
264 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
265 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
266 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
267 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
268 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
269 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'})
273 complete_apps = ['philo']