1 from django.db import models, migrations
3 import django.db.models.deletion
4 from django.conf import settings
9 class Migration(migrations.Migration):
12 ('auth', '0001_initial'),
13 ('cover', '0001_initial'),
14 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
18 migrations.CreateModel(
21 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
22 ('title', models.CharField(max_length=255, verbose_name='title', db_index=True)),
23 ('slug', models.SlugField(unique=True, max_length=128, verbose_name='slug')),
24 ('public', models.BooleanField(default=True, db_index=True, verbose_name='public')),
25 ('gallery', models.CharField(max_length=255, verbose_name='scan gallery name', blank=True)),
26 ('parent_number', models.IntegerField(db_index=True, verbose_name='parent number', null=True, editable=False, blank=True)),
27 ('_short_html', models.TextField(null=True, editable=False, blank=True)),
28 ('_single', models.NullBooleanField(db_index=True, editable=False)),
29 ('_new_publishable', models.NullBooleanField(editable=False)),
30 ('_published', models.NullBooleanField(editable=False)),
31 ('_on_track', models.IntegerField(db_index=True, null=True, editable=False, blank=True)),
32 ('dc_slug', models.CharField(db_index=True, max_length=128, null=True, editable=False, blank=True)),
35 'ordering': ['title', 'slug'],
36 'verbose_name': 'book',
37 'verbose_name_plural': 'books',
39 bases=(models.Model,),
41 migrations.CreateModel(
42 name='BookPublishRecord',
44 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
45 ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='time')),
46 ('book', models.ForeignKey(related_name='publish_log', verbose_name='book', to='catalogue.Book', on_delete=models.CASCADE)),
47 ('user', models.ForeignKey(verbose_name='user', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
50 'ordering': ['-timestamp'],
51 'verbose_name': 'book publish record',
52 'verbose_name_plural': 'book publish records',
54 bases=(models.Model,),
56 migrations.CreateModel(
59 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
60 ('number', models.IntegerField(verbose_name='number')),
61 ('title', models.CharField(max_length=255, verbose_name='title', blank=True)),
62 ('slug', models.SlugField(verbose_name='slug')),
63 ('gallery_start', models.IntegerField(default=1, null=True, verbose_name='gallery start', blank=True)),
64 ('_short_html', models.TextField(null=True, editable=False, blank=True)),
65 ('_hidden', models.NullBooleanField(editable=False)),
66 ('_changed', models.NullBooleanField(editable=False)),
67 ('book', models.ForeignKey(editable=False, to='catalogue.Book', verbose_name='book', on_delete=models.CASCADE)),
68 ('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)),
71 'ordering': ['number'],
72 'verbose_name': 'chunk',
73 'verbose_name_plural': 'chunks',
74 'permissions': [('can_pubmark', 'Can mark for publishing')],
76 bases=(models.Model,),
78 migrations.CreateModel(
81 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
82 ('author_name', models.CharField(help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author name', blank=True)),
83 ('author_email', models.CharField(help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author email', blank=True)),
84 ('revision', models.IntegerField(verbose_name='revision', db_index=True)),
85 ('description', models.TextField(default=b'', verbose_name='description', blank=True)),
86 ('created_at', models.DateTimeField(default=datetime.datetime.now, editable=False, db_index=True)),
87 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
88 ('data', models.FileField(upload_to=dvcs.models.data_upload_to, storage=dvcs.storage.GzipFileSystemStorage(location=settings.CATALOGUE_REPO_PATH), verbose_name='data')),
89 ('author', models.ForeignKey(verbose_name='author', blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE)),
90 ('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)),
91 ('parent', models.ForeignKey(related_name='children', default=None, blank=True, to='catalogue.ChunkChange', null=True, verbose_name='parent', on_delete=models.CASCADE)),
94 'ordering': ('created_at',),
96 'verbose_name': 'change for: chunk',
97 'verbose_name_plural': 'changes for: chunk',
99 bases=(models.Model,),
101 migrations.CreateModel(
102 name='ChunkPublishRecord',
104 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
105 ('book_record', models.ForeignKey(verbose_name='book publish record', to='catalogue.BookPublishRecord', on_delete=models.CASCADE)),
106 ('change', models.ForeignKey(related_name='publish_log', verbose_name='change', to='catalogue.ChunkChange', on_delete=models.CASCADE)),
109 'verbose_name': 'chunk publish record',
110 'verbose_name_plural': 'chunk publish records',
112 bases=(models.Model,),
114 migrations.CreateModel(
117 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
118 ('name', models.CharField(max_length=64, verbose_name='name')),
119 ('slug', models.SlugField(null=True, max_length=64, blank=True, unique=True, verbose_name='slug')),
120 ('ordering', models.IntegerField(verbose_name='ordering')),
123 'ordering': ['ordering'],
125 'verbose_name': 'tag for: chunk',
126 'verbose_name_plural': 'tags for: chunk',
128 bases=(models.Model,),
130 migrations.CreateModel(
133 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
134 ('image', models.FileField(upload_to=b'catalogue/images', verbose_name='image')),
135 ('title', models.CharField(max_length=255, verbose_name='title', blank=True)),
136 ('slug', models.SlugField(unique=True, verbose_name='slug')),
137 ('public', models.BooleanField(default=True, db_index=True, verbose_name='public')),
138 ('_short_html', models.TextField(null=True, editable=False, blank=True)),
139 ('_new_publishable', models.NullBooleanField(editable=False)),
140 ('_published', models.NullBooleanField(editable=False)),
141 ('_changed', models.NullBooleanField(editable=False)),
142 ('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)),
145 'ordering': ['title'],
146 'verbose_name': 'image',
147 'verbose_name_plural': 'images',
148 'permissions': [('can_pubmark_image', 'Can mark images for publishing')],
150 bases=(models.Model,),
152 migrations.CreateModel(
155 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
156 ('author_name', models.CharField(help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author name', blank=True)),
157 ('author_email', models.CharField(help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author email', blank=True)),
158 ('revision', models.IntegerField(verbose_name='revision', db_index=True)),
159 ('description', models.TextField(default=b'', verbose_name='description', blank=True)),
160 ('created_at', models.DateTimeField(default=datetime.datetime.now, editable=False, db_index=True)),
161 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
162 ('data', models.FileField(upload_to=dvcs.models.data_upload_to, storage=dvcs.storage.GzipFileSystemStorage(location=settings.CATALOGUE_IMAGE_REPO_PATH), verbose_name='data')),
163 ('author', models.ForeignKey(verbose_name='author', blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE)),
164 ('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)),
165 ('parent', models.ForeignKey(related_name='children', default=None, blank=True, to='catalogue.ImageChange', null=True, verbose_name='parent', on_delete=models.CASCADE)),
168 'ordering': ('created_at',),
170 'verbose_name': 'change for: image',
171 'verbose_name_plural': 'changes for: image',
173 bases=(models.Model,),
175 migrations.CreateModel(
176 name='ImagePublishRecord',
178 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
179 ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='time')),
180 ('change', models.ForeignKey(related_name='publish_log', verbose_name='change', to='catalogue.ImageChange', on_delete=models.CASCADE)),
181 ('image', models.ForeignKey(related_name='publish_log', verbose_name='image', to='catalogue.Image', on_delete=models.CASCADE)),
182 ('user', models.ForeignKey(verbose_name='user', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)),
185 'ordering': ['-timestamp'],
186 'verbose_name': 'image publish record',
187 'verbose_name_plural': 'image publish records',
189 bases=(models.Model,),
191 migrations.CreateModel(
194 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
195 ('name', models.CharField(max_length=64, verbose_name='name')),
196 ('slug', models.SlugField(null=True, max_length=64, blank=True, unique=True, verbose_name='slug')),
197 ('ordering', models.IntegerField(verbose_name='ordering')),
200 'ordering': ['ordering'],
202 'verbose_name': 'tag for: image',
203 'verbose_name_plural': 'tags for: image',
205 bases=(models.Model,),
207 migrations.CreateModel(
210 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
211 ('name', models.CharField(unique=True, max_length=255, verbose_name='name')),
212 ('notes', models.TextField(null=True, verbose_name='notes', blank=True)),
215 'ordering': ['name'],
216 'verbose_name': 'project',
217 'verbose_name_plural': 'projects',
219 bases=(models.Model,),
222 model_name='imagechange',
224 field=models.ManyToManyField(related_name='change_set', verbose_name='tags', to='catalogue.ImageTag'),
225 preserve_default=True,
228 model_name='imagechange',
230 field=models.ForeignKey(related_name='change_set', verbose_name='document', to='catalogue.Image', on_delete=models.CASCADE),
231 preserve_default=True,
233 migrations.AlterUniqueTogether(
235 unique_together=set([('tree', 'revision')]),
240 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),
241 preserve_default=True,
246 field=models.ForeignKey(blank=True, to='catalogue.Project', null=True, on_delete=models.CASCADE),
247 preserve_default=True,
252 field=models.ForeignKey(verbose_name='stage', blank=True, to='catalogue.ImageTag', null=True, on_delete=models.CASCADE),
253 preserve_default=True,
258 field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='Work assignment.', null=True, verbose_name='user', on_delete=models.CASCADE),
259 preserve_default=True,
262 model_name='chunkchange',
264 field=models.ManyToManyField(related_name='change_set', verbose_name='tags', to='catalogue.ChunkTag'),
265 preserve_default=True,
268 model_name='chunkchange',
270 field=models.ForeignKey(related_name='change_set', verbose_name='document', to='catalogue.Chunk', on_delete=models.CASCADE),
271 preserve_default=True,
273 migrations.AlterUniqueTogether(
275 unique_together=set([('tree', 'revision')]),
280 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),
281 preserve_default=True,
286 field=models.ForeignKey(verbose_name='stage', blank=True, to='catalogue.ChunkTag', null=True, on_delete=models.CASCADE),
287 preserve_default=True,
292 field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='Work assignment.', null=True, verbose_name='user', on_delete=models.CASCADE),
293 preserve_default=True,
295 migrations.AlterUniqueTogether(
297 unique_together=set([('book', 'number'), ('book', 'slug')]),
301 name='dc_cover_image',
302 field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, editable=False, to='cover.Image', null=True),
303 preserve_default=True,
308 field=models.ForeignKey(related_name='children', blank=True, editable=False, to='catalogue.Book', null=True, verbose_name='parent', on_delete=models.CASCADE),
309 preserve_default=True,
314 field=models.ForeignKey(blank=True, to='catalogue.Project', null=True, on_delete=models.CASCADE),
315 preserve_default=True,
317 migrations.CreateModel(
324 bases=('auth.user',),