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 'Collection.kind'
12 db.add_column(u'catalogue_collection', 'kind',
13 self.gf('django.db.models.fields.CharField')(default='book', max_length=10, db_index=True),
17 def backwards(self, orm):
18 # Deleting field 'Collection.kind'
19 db.delete_column(u'catalogue_collection', 'kind')
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': "('sort_key',)", 'object_name': 'Book'},
54 '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
55 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
56 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
57 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
58 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
59 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
60 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}),
61 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
62 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}),
63 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
64 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}),
65 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
66 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
67 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}),
68 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
69 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
70 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}),
71 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
72 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
73 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
74 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}),
75 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
76 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'})
78 'catalogue.bookmedia': {
79 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
80 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
81 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
82 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
83 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
84 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
85 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
86 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'", 'db_index': 'True'}),
87 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'})
89 'catalogue.collection': {
90 'Meta': {'ordering': "('title',)", 'object_name': 'Collection'},
91 'book_slugs': ('django.db.models.fields.TextField', [], {}),
92 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
93 'kind': ('django.db.models.fields.CharField', [], {'default': "'book'", 'max_length': '10', 'db_index': 'True'}),
94 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True'}),
95 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'})
97 'catalogue.fragment': {
98 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
99 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
100 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
101 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102 'short_text': ('django.db.models.fields.TextField', [], {}),
103 'text': ('django.db.models.fields.TextField', [], {})
106 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
107 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
108 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
109 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
110 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
111 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
112 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
113 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
114 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
115 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
116 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
117 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
118 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
120 'catalogue.tagrelation': {
121 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "u'catalogue_tag_relation'"},
122 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
123 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
124 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
125 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
127 u'contenttypes.contenttype': {
128 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
129 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
130 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
131 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
132 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
136 complete_apps = ['catalogue']