1 from django.db import models, migrations
2 import django.db.models.deletion
3 import fnpdjango.storage
4 import catalogue.fields
5 import catalogue.models.bookmedia
6 from django.conf import settings
7 import catalogue.models.book
10 class Migration(migrations.Migration):
13 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14 ('contenttypes', '0001_initial'),
18 migrations.CreateModel(
21 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
22 ('title', models.CharField(max_length=120, verbose_name='Title')),
23 ('sort_key', models.CharField(verbose_name='Sort key', max_length=120, editable=False, db_index=True)),
24 ('sort_key_author', models.CharField(default='', verbose_name='sort key by author', max_length=120, editable=False, db_index=True)),
25 ('slug', models.SlugField(unique=True, max_length=120, verbose_name='Slug')),
26 ('common_slug', models.SlugField(max_length=120, verbose_name='Slug')),
27 ('language', models.CharField(default='pol', max_length=3, verbose_name='language code', db_index=True)),
28 ('description', models.TextField(verbose_name='Description', blank=True)),
29 ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date', db_index=True)),
30 ('changed_at', models.DateTimeField(auto_now=True, verbose_name='creation date', db_index=True)),
31 ('parent_number', models.IntegerField(default=0, verbose_name='Parent number')),
32 ('extra_info', models.TextField(default='{}', verbose_name='Additional information')),
33 ('gazeta_link', models.CharField(max_length=240, blank=True)),
34 ('wiki_link', models.CharField(max_length=240, blank=True)),
35 ('cover', catalogue.fields.EbookField('cover', upload_to=catalogue.models.book._cover_upload_to, storage=fnpdjango.storage.BofhFileSystemStorage(), max_length=255, blank=True, null=True, verbose_name='cover')),
36 ('cover_thumb', catalogue.fields.EbookField('cover_thumb', max_length=255, upload_to=catalogue.models.book._cover_thumb_upload_to, null=True, verbose_name='cover thumbnail', blank=True)),
37 ('_related_info', models.TextField(null=True, editable=False, blank=True)),
38 ('txt_file', catalogue.fields.EbookField('txt', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._txt_upload_to, max_length=255, blank=True, verbose_name='TXT file')),
39 ('fb2_file', catalogue.fields.EbookField('fb2', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._fb2_upload_to, max_length=255, blank=True, verbose_name='FB2 file')),
40 ('pdf_file', catalogue.fields.EbookField('pdf', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._pdf_upload_to, max_length=255, blank=True, verbose_name='PDF file')),
41 ('epub_file', catalogue.fields.EbookField('epub', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._epub_upload_to, max_length=255, blank=True, verbose_name='EPUB file')),
42 ('mobi_file', catalogue.fields.EbookField('mobi', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._mobi_upload_to, max_length=255, blank=True, verbose_name='MOBI file')),
43 ('html_file', catalogue.fields.EbookField('html', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._html_upload_to, max_length=255, blank=True, verbose_name='HTML file')),
44 ('xml_file', catalogue.fields.EbookField('xml', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._xml_upload_to, max_length=255, blank=True, verbose_name='XML file')),
45 ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='children', blank=True, to='catalogue.Book', null=True)),
48 'ordering': ('sort_key',),
49 'verbose_name': 'book',
50 'verbose_name_plural': 'Books',
52 bases=(models.Model,),
54 migrations.CreateModel(
57 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
58 ('type', models.CharField(db_index=True, max_length=20, verbose_name='type', choices=[('mp3', 'MP3 file'), ('ogg', 'Ogg Vorbis file'), ('daisy', 'DAISY file')])),
59 ('name', models.CharField(max_length=512, verbose_name='name')),
60 ('file', catalogue.fields.OverwritingFileField(upload_to=catalogue.models.bookmedia._file_upload_to, max_length=600, verbose_name='XML file')),
61 ('uploaded_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date', db_index=True)),
62 ('extra_info', models.TextField(default='{}', verbose_name='Additional information', editable=False)),
63 ('source_sha1', models.CharField(max_length=40, null=True, editable=False, blank=True)),
64 ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='media', to='catalogue.Book')),
67 'ordering': ('type', 'name'),
68 'verbose_name': 'book media',
69 'verbose_name_plural': 'book media',
71 bases=(models.Model,),
73 migrations.CreateModel(
76 ('title', models.CharField(max_length=120, verbose_name='Title', db_index=True)),
77 ('title_de', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
78 ('title_en', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
79 ('title_es', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
80 ('title_fr', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
81 ('title_it', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
82 ('title_lt', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
83 ('title_pl', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
84 ('title_ru', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
85 ('title_uk', models.CharField(max_length=120, null=True, verbose_name='Title', db_index=True)),
86 ('slug', models.SlugField(max_length=120, serialize=False, verbose_name='Slug', primary_key=True)),
87 ('description', models.TextField(null=True, verbose_name='Description', blank=True)),
88 ('description_de', models.TextField(null=True, verbose_name='Description', blank=True)),
89 ('description_en', models.TextField(null=True, verbose_name='Description', blank=True)),
90 ('description_es', models.TextField(null=True, verbose_name='Description', blank=True)),
91 ('description_fr', models.TextField(null=True, verbose_name='Description', blank=True)),
92 ('description_it', models.TextField(null=True, verbose_name='Description', blank=True)),
93 ('description_lt', models.TextField(null=True, verbose_name='Description', blank=True)),
94 ('description_pl', models.TextField(null=True, verbose_name='Description', blank=True)),
95 ('description_ru', models.TextField(null=True, verbose_name='Description', blank=True)),
96 ('description_uk', models.TextField(null=True, verbose_name='Description', blank=True)),
97 ('book_slugs', models.TextField(verbose_name='Book stubs')),
98 ('kind', models.CharField(default='book', max_length=10, verbose_name='form', db_index=True, choices=[('book', 'book'), ('picture', 'picture')])),
101 'ordering': ('title',),
102 'verbose_name': 'collection',
103 'verbose_name_plural': 'collections',
105 bases=(models.Model,),
107 migrations.CreateModel(
110 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
111 ('text', models.TextField()),
112 ('short_text', models.TextField(editable=False)),
113 ('anchor', models.CharField(max_length=120)),
114 ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fragments', to='catalogue.Book')),
117 'ordering': ('book', 'anchor'),
118 'verbose_name': 'Fragment',
119 'verbose_name_plural': 'Fragments',
121 bases=(models.Model,),
123 migrations.CreateModel(
126 ('netloc', models.CharField(max_length=120, serialize=False, verbose_name='network location', primary_key=True)),
127 ('name', models.CharField(max_length=120, verbose_name='name', blank=True)),
128 ('name_de', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
129 ('name_en', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
130 ('name_es', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
131 ('name_fr', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
132 ('name_it', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
133 ('name_lt', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
134 ('name_pl', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
135 ('name_ru', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
136 ('name_uk', models.CharField(max_length=120, null=True, verbose_name='name', blank=True)),
139 'ordering': ('netloc',),
140 'verbose_name': 'source',
141 'verbose_name_plural': 'sources',
143 bases=(models.Model,),
145 migrations.CreateModel(
148 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
149 ('name', models.CharField(max_length=50, verbose_name='name', db_index=True)),
150 ('name_de', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
151 ('name_en', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
152 ('name_es', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
153 ('name_fr', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
154 ('name_it', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
155 ('name_lt', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
156 ('name_pl', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
157 ('name_ru', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
158 ('name_uk', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)),
159 ('slug', models.SlugField(max_length=120, verbose_name='Slug')),
160 ('sort_key', models.CharField(max_length=120, verbose_name='Sort key', db_index=True)),
161 ('category', models.CharField(db_index=True, max_length=50, verbose_name='Category', choices=[('author', 'author'), ('epoch', 'period'), ('kind', 'form'), ('genre', 'genre'), ('theme', 'motif'), ('set', 'set'), ('book', 'book'), ('thing', 'thing')])),
162 ('description', models.TextField(verbose_name='Description', blank=True)),
163 ('description_de', models.TextField(null=True, verbose_name='Description', blank=True)),
164 ('description_en', models.TextField(null=True, verbose_name='Description', blank=True)),
165 ('description_es', models.TextField(null=True, verbose_name='Description', blank=True)),
166 ('description_fr', models.TextField(null=True, verbose_name='Description', blank=True)),
167 ('description_it', models.TextField(null=True, verbose_name='Description', blank=True)),
168 ('description_lt', models.TextField(null=True, verbose_name='Description', blank=True)),
169 ('description_pl', models.TextField(null=True, verbose_name='Description', blank=True)),
170 ('description_ru', models.TextField(null=True, verbose_name='Description', blank=True)),
171 ('description_uk', models.TextField(null=True, verbose_name='Description', blank=True)),
172 ('book_count', models.IntegerField(null=True, verbose_name='Number of books', blank=True)),
173 ('picture_count', models.IntegerField(null=True, verbose_name='picture count', blank=True)),
174 ('gazeta_link', models.CharField(max_length=240, blank=True)),
175 ('culturepl_link', models.CharField(max_length=240, blank=True)),
176 ('wiki_link', models.CharField(max_length=240, blank=True)),
177 ('wiki_link_de', models.CharField(max_length=240, null=True, blank=True)),
178 ('wiki_link_en', models.CharField(max_length=240, null=True, blank=True)),
179 ('wiki_link_es', models.CharField(max_length=240, null=True, blank=True)),
180 ('wiki_link_fr', models.CharField(max_length=240, null=True, blank=True)),
181 ('wiki_link_it', models.CharField(max_length=240, null=True, blank=True)),
182 ('wiki_link_lt', models.CharField(max_length=240, null=True, blank=True)),
183 ('wiki_link_pl', models.CharField(max_length=240, null=True, blank=True)),
184 ('wiki_link_ru', models.CharField(max_length=240, null=True, blank=True)),
185 ('wiki_link_uk', models.CharField(max_length=240, null=True, blank=True)),
186 ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date', db_index=True)),
187 ('changed_at', models.DateTimeField(auto_now=True, verbose_name='creation date', db_index=True)),
188 ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, blank=True, to=settings.AUTH_USER_MODEL, null=True)),
191 'ordering': ('sort_key',),
192 'verbose_name': 'tag',
193 'verbose_name_plural': 'tags',
195 bases=(models.Model,),
197 migrations.CreateModel(
200 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
201 ('object_id', models.PositiveIntegerField(verbose_name='object id', db_index=True)),
202 ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='content type', to='contenttypes.ContentType')),
203 ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', verbose_name='tag', to='catalogue.Tag')),
206 'db_table': 'catalogue_tag_relation',
208 bases=(models.Model,),
210 migrations.AlterUniqueTogether(
212 unique_together=set([('tag', 'content_type', 'object_id')]),
214 migrations.AlterUniqueTogether(
216 unique_together=set([('slug', 'category')]),