3 from south.db import db
4 from south.v2 import DataMigration
5 from django.db import models
7 class Migration(DataMigration):
9 def forwards(self, orm):
10 "Write your forwards methods here."
11 # If any tags are longer than 100, this will result in some data loss.
12 PhiloTag = orm['philo.Tag']
13 Tag = orm['taggit.Tag']
15 for tag in PhiloTag.objects.all():
16 Tag.objects.get_or_create(name=tag.name, slug=tag.slug)
19 def backwards(self, orm):
20 "Write your backwards methods here."
25 'contenttypes.contenttype': {
26 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
27 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
28 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
29 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
30 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
33 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
34 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
35 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
36 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
37 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
38 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
39 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
42 'Meta': {'object_name': 'Collection'},
43 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
44 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
47 'philo.collectionmember': {
48 'Meta': {'object_name': 'CollectionMember'},
49 'collection': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['philo.Collection']"}),
50 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
51 'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
52 'member_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
53 'member_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
56 'Meta': {'object_name': 'Contentlet'},
57 'content': ('philo.models.fields.TemplateField', [], {}),
58 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
60 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentlets'", 'to': "orm['philo.Page']"})
62 'philo.contentreference': {
63 'Meta': {'object_name': 'ContentReference'},
64 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
65 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
66 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
67 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
68 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentreferences'", 'to': "orm['philo.Page']"})
71 'Meta': {'object_name': 'File'},
72 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
73 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
74 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
75 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
77 'philo.foreignkeyvalue': {
78 'Meta': {'object_name': 'ForeignKeyValue'},
79 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
80 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
81 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
84 'Meta': {'object_name': 'JSONValue'},
85 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
86 'value': ('philo.models.fields.JSONField', [], {'default': "'null'", 'db_index': 'True'})
88 'philo.manytomanyvalue': {
89 'Meta': {'object_name': 'ManyToManyValue'},
90 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
91 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
92 'values': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.ForeignKeyValue']", 'null': 'True', 'blank': 'True'})
95 'Meta': {'unique_together': "(('parent', 'slug'),)", 'object_name': 'Node'},
96 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
97 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
98 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
99 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
100 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
101 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
102 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
103 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'node_view_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
104 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
107 'Meta': {'object_name': 'Page'},
108 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
110 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
113 'Meta': {'object_name': 'Redirect'},
114 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
115 'reversing_parameters': ('philo.models.fields.JSONField', [], {'blank': 'True'}),
116 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
117 'target_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'philo_redirect_related'", 'null': 'True', 'to': "orm['philo.Node']"}),
118 'url_or_subpath': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'})
121 'Meta': {'ordering': "('name',)", 'object_name': 'Tag'},
122 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
123 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
124 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
127 'Meta': {'unique_together': "(('parent', 'slug'),)", 'object_name': 'Template'},
128 'code': ('philo.models.fields.TemplateField', [], {}),
129 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
130 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
131 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
132 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
133 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
134 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
135 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
136 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
137 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
138 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
141 'Meta': {'object_name': 'Tag'},
142 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
143 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
144 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
146 'taggit.taggeditem': {
147 'Meta': {'object_name': 'TaggedItem'},
148 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
149 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
150 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
151 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
155 complete_apps = ['taggit', 'philo']