1 # -*- coding: utf-8 -*-
2 from south.utils import datetime_utils as datetime
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 model 'Template'
12 db.create_table(u'catalogue_template', (
13 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
15 ('content', self.gf('django.db.models.fields.TextField')()),
17 db.send_create_signal(u'catalogue', ['Template'])
20 def backwards(self, orm):
21 # Deleting model 'Template'
22 db.delete_table(u'catalogue_template')
27 'Meta': {'object_name': 'Group'},
28 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
29 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
30 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
33 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
34 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
35 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
36 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
37 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
40 'Meta': {'object_name': 'User'},
41 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
42 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
43 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
44 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
45 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
47 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
48 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
49 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
50 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
51 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
52 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
53 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
56 'Meta': {'ordering': "['title', 'slug']", 'object_name': 'Book'},
57 '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
58 '_on_track': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
59 '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
60 '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
61 '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
62 'dc_cover_image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cover.Image']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
63 'dc_slug': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}),
64 'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
65 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
66 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
67 'parent_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
68 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Project']", 'null': 'True', 'blank': 'True'}),
69 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
70 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}),
71 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
73 'catalogue.bookpublishrecord': {
74 'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'},
75 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}),
76 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
77 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
78 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
81 'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'},
82 '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
83 '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
84 '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
85 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}),
86 'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_chunk'", 'null': 'True', 'to': u"orm['auth.User']"}),
87 'gallery_start': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}),
88 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}),
89 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
90 'number': ('django.db.models.fields.IntegerField', [], {}),
91 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
92 'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}),
93 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
94 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
96 'catalogue.chunkchange': {
97 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ChunkChange'},
98 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
99 'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
100 'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
101 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
102 'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
103 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
104 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
105 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}),
106 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}),
107 'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
108 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
109 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ChunkTag']"}),
110 'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Chunk']"})
112 'catalogue.chunkpublishrecord': {
113 'Meta': {'object_name': 'ChunkPublishRecord'},
114 'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}),
115 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}),
116 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
118 'catalogue.chunktag': {
119 'Meta': {'ordering': "['ordering']", 'object_name': 'ChunkTag'},
120 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
121 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
122 'ordering': ('django.db.models.fields.IntegerField', [], {}),
123 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'})
125 'catalogue.project': {
126 'Meta': {'ordering': "['name']", 'object_name': 'Project'},
127 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
128 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
129 'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
131 u'catalogue.template': {
132 'Meta': {'object_name': 'Template'},
133 'content': ('django.db.models.fields.TextField', [], {}),
134 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
135 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
137 u'contenttypes.contenttype': {
138 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
139 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
140 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
141 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
142 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
145 'Meta': {'object_name': 'Image'},
146 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
147 'download_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'unique': 'True', 'null': 'True'}),
148 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
149 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
150 'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
151 'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}),
152 'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'}),
153 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
157 complete_apps = ['catalogue']