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 'Navigation'
12 db.create_table('shipherd_navigation', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('node', self.gf('django.db.models.fields.related.ForeignKey')(related_name='navigation_set', to=orm['philo.Node'])),
15 ('key', self.gf('django.db.models.fields.CharField')(max_length=255)),
16 ('depth', self.gf('django.db.models.fields.PositiveSmallIntegerField')(default=3)),
18 db.send_create_signal('shipherd', ['Navigation'])
20 # Adding unique constraint on 'Navigation', fields ['node', 'key']
21 db.create_unique('shipherd_navigation', ['node_id', 'key'])
23 # Adding model 'NavigationItem'
24 db.create_table('shipherd_navigationitem', (
25 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
26 ('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['shipherd.NavigationItem'])),
27 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=255, db_index=True)),
28 ('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)),
29 ('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)),
30 ('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)),
31 ('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)),
32 ('navigation', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='roots', null=True, to=orm['shipherd.Navigation'])),
33 ('text', self.gf('django.db.models.fields.CharField')(max_length=50)),
34 ('target_node', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='navigation_items', null=True, to=orm['philo.Node'])),
35 ('url_or_subpath', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)),
36 ('reversing_parameters', self.gf('philo.models.fields.JSONField')(blank=True)),
37 ('order', self.gf('django.db.models.fields.PositiveSmallIntegerField')(default=0)),
39 db.send_create_signal('shipherd', ['NavigationItem'])
42 def backwards(self, orm):
44 # Deleting model 'Navigation'
45 db.delete_table('shipherd_navigation')
47 # Removing unique constraint on 'Navigation', fields ['node', 'key']
48 db.delete_unique('shipherd_navigation', ['node_id', 'key'])
50 # Deleting model 'NavigationItem'
51 db.delete_table('shipherd_navigationitem')
55 'contenttypes.contenttype': {
56 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
57 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
58 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
60 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
63 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
64 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
65 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
66 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
67 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
68 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
69 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
72 'Meta': {'object_name': 'Node'},
73 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
74 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
75 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
76 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
77 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
78 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
79 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
80 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
81 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
83 'shipherd.navigation': {
84 'Meta': {'unique_together': "(('node', 'key'),)", 'object_name': 'Navigation'},
85 'depth': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '3'}),
86 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
87 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
88 'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'navigation_set'", 'to': "orm['philo.Node']"})
90 'shipherd.navigationitem': {
91 'Meta': {'object_name': 'NavigationItem'},
92 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
94 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
95 'navigation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'roots'", 'null': 'True', 'to': "orm['shipherd.Navigation']"}),
96 'order': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}),
97 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['shipherd.NavigationItem']"}),
98 'reversing_parameters': ('philo.models.fields.JSONField', [], {'blank': 'True'}),
99 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
100 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
101 'target_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'navigation_items'", 'null': 'True', 'to': "orm['philo.Node']"}),
102 'text': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
103 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
104 'url_or_subpath': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'})
108 complete_apps = ['shipherd']