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 index on 'BookMedia', fields ['uploaded_at']
12 db.create_index(u'catalogue_bookmedia', ['uploaded_at'])
14 # Adding index on 'BookMedia', fields ['type']
15 db.create_index(u'catalogue_bookmedia', ['type'])
18 def backwards(self, orm):
19 # Removing index on 'BookMedia', fields ['type']
20 db.delete_index(u'catalogue_bookmedia', ['type'])
22 # Removing index on 'BookMedia', fields ['uploaded_at']
23 db.delete_index(u'catalogue_bookmedia', ['uploaded_at'])
28 'Meta': {'object_name': 'Group'},
29 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
30 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
31 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
34 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
35 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
36 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
37 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
38 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
41 'Meta': {'object_name': 'User'},
42 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
43 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
44 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
45 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
46 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
47 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
48 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
49 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
50 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
51 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
52 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
53 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
54 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
57 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
58 '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
59 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
60 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
61 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
62 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
63 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
64 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}),
65 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
66 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}),
67 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
68 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}),
69 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
71 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}),
72 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
73 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
74 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}),
75 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
76 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
77 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
78 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}),
79 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
80 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'})
82 'catalogue.bookmedia': {
83 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
84 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
85 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
86 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
87 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
88 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
89 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
90 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'", 'db_index': 'True'}),
91 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'})
93 'catalogue.collection': {
94 'Meta': {'ordering': "('title',)", 'object_name': 'Collection'},
95 'book_slugs': ('django.db.models.fields.TextField', [], {}),
96 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
97 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True'}),
98 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'})
100 'catalogue.fragment': {
101 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
102 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
103 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
104 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
105 'short_text': ('django.db.models.fields.TextField', [], {}),
106 'text': ('django.db.models.fields.TextField', [], {})
109 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
110 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
111 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
112 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
113 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
114 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
115 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
116 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
117 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
118 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
119 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
120 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
121 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
123 'catalogue.tagrelation': {
124 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "u'catalogue_tag_relation'"},
125 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
126 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
127 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
128 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
130 u'contenttypes.contenttype': {
131 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
132 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
133 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
134 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
135 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
139 complete_apps = ['catalogue']