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 'Source'
12 db.create_table(u'catalogue_source', (
13 ('netloc', self.gf('django.db.models.fields.CharField')(max_length=120, primary_key=True)),
14 ('name', self.gf('django.db.models.fields.CharField')(max_length=120)),
16 db.send_create_signal('catalogue', ['Source'])
19 def backwards(self, orm):
20 # Deleting model 'Source'
21 db.delete_table(u'catalogue_source')
26 'Meta': {'object_name': 'Group'},
27 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
28 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
29 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
32 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
33 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
34 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
35 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
36 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
39 'Meta': {'object_name': 'User'},
40 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
41 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
42 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
43 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
44 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
46 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
47 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
48 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
49 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
50 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
51 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
52 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
55 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
56 '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
57 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
58 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
59 'cover': ('catalogue.fields.EbookField', [], {'max_length': '255', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
60 'cover_thumb': ('catalogue.fields.EbookField', [], {'max_length': '255', 'null': 'True', 'format_name': "'cover_thumb'", 'blank': 'True'}),
61 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
62 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
63 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '255', 'format_name': "'epub'", 'blank': 'True'}),
64 'extra_info': ('jsonfield.fields.JSONField', [], {'default': '{}'}),
65 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '255', 'format_name': "'fb2'", 'blank': 'True'}),
66 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
67 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '255', 'format_name': "'html'", 'blank': 'True'}),
68 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
70 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '255', 'format_name': "'mobi'", 'blank': 'True'}),
71 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
72 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
73 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '255', 'format_name': "'pdf'", 'blank': 'True'}),
74 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
75 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
76 'sort_key_author': ('django.db.models.fields.CharField', [], {'default': "u''", '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': '255', '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': '255', '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': '600'}),
87 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
88 'name': ('django.db.models.fields.CharField', [], {'max_length': '512'}),
89 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
90 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', '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 'description_de': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
98 'description_en': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
99 'description_es': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
100 'description_fr': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
101 'description_it': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
102 'description_lt': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
103 'description_pl': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
104 'description_ru': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
105 'description_uk': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
106 'kind': ('django.db.models.fields.CharField', [], {'default': "'book'", 'max_length': '10', 'db_index': 'True'}),
107 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True'}),
108 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
109 'title_de': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'}),
110 'title_en': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'}),
111 'title_es': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'}),
112 'title_fr': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'}),
113 'title_it': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'}),
114 'title_lt': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'}),
115 'title_pl': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'}),
116 'title_ru': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'}),
117 'title_uk': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '120', 'null': 'True', 'blank': 'True'})
119 'catalogue.fragment': {
120 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
121 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
122 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
123 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
124 'short_text': ('django.db.models.fields.TextField', [], {}),
125 'text': ('django.db.models.fields.TextField', [], {})
127 'catalogue.source': {
128 'Meta': {'ordering': "('netloc',)", 'object_name': 'Source'},
129 'name': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
130 'netloc': ('django.db.models.fields.CharField', [], {'max_length': '120', 'primary_key': 'True'})
133 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
134 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
135 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
136 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
137 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
138 'culturepl_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
139 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
140 'description_de': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
141 'description_en': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
142 'description_es': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
143 'description_fr': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
144 'description_it': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
145 'description_lt': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
146 'description_pl': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
147 'description_ru': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
148 'description_uk': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
149 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
150 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
151 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
152 'name_de': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
153 'name_en': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
154 'name_es': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
155 'name_fr': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
156 'name_it': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
157 'name_lt': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
158 'name_pl': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
159 'name_ru': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
160 'name_uk': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
161 'picture_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
162 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
163 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
164 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
165 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
166 'wiki_link_de': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'}),
167 'wiki_link_en': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'}),
168 'wiki_link_es': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'}),
169 'wiki_link_fr': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'}),
170 'wiki_link_it': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'}),
171 'wiki_link_lt': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'}),
172 'wiki_link_pl': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'}),
173 'wiki_link_ru': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'}),
174 'wiki_link_uk': ('django.db.models.fields.CharField', [], {'max_length': '240', 'null': 'True', 'blank': 'True'})
176 'catalogue.tagrelation': {
177 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "u'catalogue_tag_relation'"},
178 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
179 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
180 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
181 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
183 u'contenttypes.contenttype': {
184 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
185 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
186 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
187 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
188 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
192 complete_apps = ['catalogue']