1 # -*- coding: utf-8 -*-
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
8 class Migration(SchemaMigration):
10 def forwards(self, orm):
11 # Adding field 'Image.project'
12 db.add_column(u'catalogue_image', 'project',
13 self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Project'], null=True, blank=True),
17 def backwards(self, orm):
18 # Deleting field 'Image.project'
19 db.delete_column(u'catalogue_image', 'project_id')
24 'Meta': {'object_name': 'Group'},
25 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
26 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
27 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
30 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
31 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
32 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
33 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
34 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
37 'Meta': {'object_name': 'User'},
38 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
39 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
40 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
41 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
42 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
43 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
44 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
45 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
46 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
47 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
48 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
49 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
50 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
53 'Meta': {'ordering': "['title', 'slug']", 'object_name': 'Book'},
54 '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
55 '_on_track': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
56 '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
57 '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
58 '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
59 'dc_cover_image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cover.Image']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
60 'dc_slug': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}),
61 'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
62 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
63 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
64 'parent_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
65 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Project']", 'null': 'True', 'blank': 'True'}),
66 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
67 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}),
68 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
70 'catalogue.bookpublishrecord': {
71 'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'},
72 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}),
73 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
74 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
75 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
78 'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'},
79 '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
80 '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
81 '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
82 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}),
83 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_chunk'", 'null': 'True', 'to': u"orm['auth.User']"}),
84 'gallery_start': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}),
85 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}),
86 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
87 'number': ('django.db.models.fields.IntegerField', [], {}),
88 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
89 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}),
90 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
91 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
93 'catalogue.chunkchange': {
94 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ChunkChange'},
95 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
96 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
97 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
98 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
99 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
100 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
101 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}),
103 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}),
104 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
105 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
106 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ChunkTag']"}),
107 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Chunk']"})
109 'catalogue.chunkpublishrecord': {
110 'Meta': {'object_name': 'ChunkPublishRecord'},
111 'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}),
112 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}),
113 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
115 'catalogue.chunktag': {
116 'Meta': {'ordering': "['ordering']", 'object_name': 'ChunkTag'},
117 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
118 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
119 'ordering': ('django.db.models.fields.IntegerField', [], {}),
120 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'})
123 'Meta': {'ordering': "['title']", 'object_name': 'Image'},
124 '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
125 '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
126 '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
127 '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
128 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_image'", 'null': 'True', 'to': u"orm['auth.User']"}),
129 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ImageChange']", 'null': 'True', 'blank': 'True'}),
130 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
131 'image': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
132 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Project']", 'null': 'True', 'blank': 'True'}),
133 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
134 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
135 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ImageTag']", 'null': 'True', 'blank': 'True'}),
136 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
137 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
139 'catalogue.imagechange': {
140 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ImageChange'},
141 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
142 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
143 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
144 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
145 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
146 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
147 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
148 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ImageChange']"}),
149 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ImageChange']"}),
150 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
151 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
152 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ImageTag']"}),
153 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Image']"})
155 'catalogue.imagepublishrecord': {
156 'Meta': {'ordering': "['-timestamp']", 'object_name': 'ImagePublishRecord'},
157 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ImageChange']"}),
158 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
159 'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Image']"}),
160 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
161 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
163 'catalogue.imagetag': {
164 'Meta': {'ordering': "['ordering']", 'object_name': 'ImageTag'},
165 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
166 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
167 'ordering': ('django.db.models.fields.IntegerField', [], {}),
168 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'})
170 'catalogue.project': {
171 'Meta': {'ordering': "['name']", 'object_name': 'Project'},
172 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
173 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
174 'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
176 u'contenttypes.contenttype': {
177 'Meta': {'ordering': "('name',)", '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 u'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': {'object_name': 'Image'},
185 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
186 'download_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
187 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
188 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
189 'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
190 'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}),
191 'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
192 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
196 complete_apps = ['catalogue']