1 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 from django.db import models, migrations
6 import django.db.models.deletion
7 from django.conf import settings
12 class Migration(migrations.Migration):
15 ('auth', '0001_initial'),
16 ('cover', '0001_initial'),
17 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
21 migrations.CreateModel(
24 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
25 ('title', models.CharField(max_length=255, verbose_name='title', db_index=True)),
26 ('slug', models.SlugField(unique=True, max_length=128, verbose_name='slug')),
27 ('public', models.BooleanField(default=True, db_index=True, verbose_name='public')),
28 ('gallery', models.CharField(max_length=255, verbose_name='scan gallery name', blank=True)),
29 ('parent_number', models.IntegerField(db_index=True, verbose_name='parent number', null=True, editable=False, blank=True)),
30 ('_short_html', models.TextField(null=True, editable=False, blank=True)),
31 ('_single', models.NullBooleanField(db_index=True, editable=False)),
32 ('_new_publishable', models.NullBooleanField(editable=False)),
33 ('_published', models.NullBooleanField(editable=False)),
34 ('_on_track', models.IntegerField(db_index=True, null=True, editable=False, blank=True)),
35 ('dc_slug', models.CharField(db_index=True, max_length=128, null=True, editable=False, blank=True)),
38 'ordering': ['title', 'slug'],
39 'verbose_name': 'book',
40 'verbose_name_plural': 'books',
42 bases=(models.Model,),
44 migrations.CreateModel(
45 name='BookPublishRecord',
47 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
48 ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='time')),
49 ('book', models.ForeignKey(related_name='publish_log', verbose_name='book', to='catalogue.Book', on_delete=models.CASCADE)),
50 ('user', models.ForeignKey(verbose_name='user', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
53 'ordering': ['-timestamp'],
54 'verbose_name': 'book publish record',
55 'verbose_name_plural': 'book publish records',
57 bases=(models.Model,),
59 migrations.CreateModel(
62 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
63 ('number', models.IntegerField(verbose_name='number')),
64 ('title', models.CharField(max_length=255, verbose_name='title', blank=True)),
65 ('slug', models.SlugField(verbose_name='slug')),
66 ('gallery_start', models.IntegerField(default=1, null=True, verbose_name='gallery start', blank=True)),
67 ('_short_html', models.TextField(null=True, editable=False, blank=True)),
68 ('_hidden', models.NullBooleanField(editable=False)),
69 ('_changed', models.NullBooleanField(editable=False)),
70 ('book', models.ForeignKey(editable=False, to='catalogue.Book', verbose_name='book', on_delete=models.CASCADE)),
71 ('creator', models.ForeignKey(related_name='created_chunk', blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='creator', on_delete=models.CASCADE)),
74 'ordering': ['number'],
75 'verbose_name': 'chunk',
76 'verbose_name_plural': 'chunks',
77 'permissions': [('can_pubmark', 'Can mark for publishing')],
79 bases=(models.Model,),
81 migrations.CreateModel(
84 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
85 ('author_name', models.CharField(help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author name', blank=True)),
86 ('author_email', models.CharField(help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author email', blank=True)),
87 ('revision', models.IntegerField(verbose_name='revision', db_index=True)),
88 ('description', models.TextField(default=b'', verbose_name='description', blank=True)),
89 ('created_at', models.DateTimeField(default=datetime.datetime.now, editable=False, db_index=True)),
90 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
91 ('data', models.FileField(upload_to=dvcs.models.data_upload_to, storage=dvcs.storage.GzipFileSystemStorage(location=settings.CATALOGUE_REPO_PATH), verbose_name='data')),
92 ('author', models.ForeignKey(verbose_name='author', blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE)),
93 ('merge_parent', models.ForeignKey(related_name='merge_children', default=None, blank=True, to='catalogue.ChunkChange', null=True, verbose_name='merge parent', on_delete=models.CASCADE)),
94 ('parent', models.ForeignKey(related_name='children', default=None, blank=True, to='catalogue.ChunkChange', null=True, verbose_name='parent', on_delete=models.CASCADE)),
97 'ordering': ('created_at',),
99 'verbose_name': 'change for: chunk',
100 'verbose_name_plural': 'changes for: chunk',
102 bases=(models.Model,),
104 migrations.CreateModel(
105 name='ChunkPublishRecord',
107 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
108 ('book_record', models.ForeignKey(verbose_name='book publish record', to='catalogue.BookPublishRecord', on_delete=models.CASCADE)),
109 ('change', models.ForeignKey(related_name='publish_log', verbose_name='change', to='catalogue.ChunkChange', on_delete=models.CASCADE)),
112 'verbose_name': 'chunk publish record',
113 'verbose_name_plural': 'chunk publish records',
115 bases=(models.Model,),
117 migrations.CreateModel(
120 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
121 ('name', models.CharField(max_length=64, verbose_name='name')),
122 ('slug', models.SlugField(null=True, max_length=64, blank=True, unique=True, verbose_name='slug')),
123 ('ordering', models.IntegerField(verbose_name='ordering')),
126 'ordering': ['ordering'],
128 'verbose_name': 'tag for: chunk',
129 'verbose_name_plural': 'tags for: chunk',
131 bases=(models.Model,),
133 migrations.CreateModel(
136 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
137 ('image', models.FileField(upload_to=b'catalogue/images', verbose_name='image')),
138 ('title', models.CharField(max_length=255, verbose_name='title', blank=True)),
139 ('slug', models.SlugField(unique=True, verbose_name='slug')),
140 ('public', models.BooleanField(default=True, db_index=True, verbose_name='public')),
141 ('_short_html', models.TextField(null=True, editable=False, blank=True)),
142 ('_new_publishable', models.NullBooleanField(editable=False)),
143 ('_published', models.NullBooleanField(editable=False)),
144 ('_changed', models.NullBooleanField(editable=False)),
145 ('creator', models.ForeignKey(related_name='created_image', blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='creator', on_delete=models.CASCADE)),
148 'ordering': ['title'],
149 'verbose_name': 'image',
150 'verbose_name_plural': 'images',
151 'permissions': [('can_pubmark_image', 'Can mark images for publishing')],
153 bases=(models.Model,),
155 migrations.CreateModel(
158 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
159 ('author_name', models.CharField(help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author name', blank=True)),
160 ('author_email', models.CharField(help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author email', blank=True)),
161 ('revision', models.IntegerField(verbose_name='revision', db_index=True)),
162 ('description', models.TextField(default=b'', verbose_name='description', blank=True)),
163 ('created_at', models.DateTimeField(default=datetime.datetime.now, editable=False, db_index=True)),
164 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
165 ('data', models.FileField(upload_to=dvcs.models.data_upload_to, storage=dvcs.storage.GzipFileSystemStorage(location=settings.CATALOGUE_IMAGE_REPO_PATH), verbose_name='data')),
166 ('author', models.ForeignKey(verbose_name='author', blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE)),
167 ('merge_parent', models.ForeignKey(related_name='merge_children', default=None, blank=True, to='catalogue.ImageChange', null=True, verbose_name='merge parent', on_delete=models.CASCADE)),
168 ('parent', models.ForeignKey(related_name='children', default=None, blank=True, to='catalogue.ImageChange', null=True, verbose_name='parent', on_delete=models.CASCADE)),
171 'ordering': ('created_at',),
173 'verbose_name': 'change for: image',
174 'verbose_name_plural': 'changes for: image',
176 bases=(models.Model,),
178 migrations.CreateModel(
179 name='ImagePublishRecord',
181 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
182 ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='time')),
183 ('change', models.ForeignKey(related_name='publish_log', verbose_name='change', to='catalogue.ImageChange', on_delete=models.CASCADE)),
184 ('image', models.ForeignKey(related_name='publish_log', verbose_name='image', to='catalogue.Image', on_delete=models.CASCADE)),
185 ('user', models.ForeignKey(verbose_name='user', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
188 'ordering': ['-timestamp'],
189 'verbose_name': 'image publish record',
190 'verbose_name_plural': 'image publish records',
192 bases=(models.Model,),
194 migrations.CreateModel(
197 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
198 ('name', models.CharField(max_length=64, verbose_name='name')),
199 ('slug', models.SlugField(null=True, max_length=64, blank=True, unique=True, verbose_name='slug')),
200 ('ordering', models.IntegerField(verbose_name='ordering')),
203 'ordering': ['ordering'],
205 'verbose_name': 'tag for: image',
206 'verbose_name_plural': 'tags for: image',
208 bases=(models.Model,),
210 migrations.CreateModel(
213 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
214 ('name', models.CharField(unique=True, max_length=255, verbose_name='name')),
215 ('notes', models.TextField(null=True, verbose_name='notes', blank=True)),
218 'ordering': ['name'],
219 'verbose_name': 'project',
220 'verbose_name_plural': 'projects',
222 bases=(models.Model,),
225 model_name='imagechange',
227 field=models.ManyToManyField(related_name='change_set', verbose_name='tags', to='catalogue.ImageTag'),
228 preserve_default=True,
231 model_name='imagechange',
233 field=models.ForeignKey(related_name='change_set', verbose_name='document', to='catalogue.Image', on_delete=models.CASCADE),
234 preserve_default=True,
236 migrations.AlterUniqueTogether(
238 unique_together=set([('tree', 'revision')]),
243 field=models.ForeignKey(default=None, editable=False, to='catalogue.ImageChange', blank=True, help_text="This document's current head.", null=True, verbose_name='head', on_delete=models.CASCADE),
244 preserve_default=True,
249 field=models.ForeignKey(blank=True, to='catalogue.Project', null=True, on_delete=models.CASCADE),
250 preserve_default=True,
255 field=models.ForeignKey(verbose_name='stage', blank=True, to='catalogue.ImageTag', null=True, on_delete=models.CASCADE),
256 preserve_default=True,
261 field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='Work assignment.', null=True, verbose_name='user', on_delete=models.CASCADE),
262 preserve_default=True,
265 model_name='chunkchange',
267 field=models.ManyToManyField(related_name='change_set', verbose_name='tags', to='catalogue.ChunkTag'),
268 preserve_default=True,
271 model_name='chunkchange',
273 field=models.ForeignKey(related_name='change_set', verbose_name='document', to='catalogue.Chunk', on_delete=models.CASCADE),
274 preserve_default=True,
276 migrations.AlterUniqueTogether(
278 unique_together=set([('tree', 'revision')]),
283 field=models.ForeignKey(default=None, editable=False, to='catalogue.ChunkChange', blank=True, help_text="This document's current head.", null=True, verbose_name='head', on_delete=models.CASCADE),
284 preserve_default=True,
289 field=models.ForeignKey(verbose_name='stage', blank=True, to='catalogue.ChunkTag', null=True, on_delete=models.CASCADE),
290 preserve_default=True,
295 field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='Work assignment.', null=True, verbose_name='user', on_delete=models.CASCADE),
296 preserve_default=True,
298 migrations.AlterUniqueTogether(
300 unique_together=set([('book', 'number'), ('book', 'slug')]),
304 name='dc_cover_image',
305 field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, editable=False, to='cover.Image', null=True),
306 preserve_default=True,
311 field=models.ForeignKey(related_name='children', blank=True, editable=False, to='catalogue.Book', null=True, verbose_name='parent', on_delete=models.CASCADE),
312 preserve_default=True,
317 field=models.ForeignKey(blank=True, to='catalogue.Project', null=True, on_delete=models.CASCADE),
318 preserve_default=True,
320 migrations.CreateModel(
327 bases=('auth.user',),