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.
6 from django.conf import settings
7 from django.db import migrations, models
8 import django.db.models.deletion
13 class Migration(migrations.Migration):
18 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
22 migrations.CreateModel(
25 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
26 ('creator', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='created_adocument', to=settings.AUTH_USER_MODEL, verbose_name='creator')),
32 migrations.CreateModel(
33 name='ADocumentChange',
35 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
36 ('author_name', models.CharField(blank=True, help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author name')),
37 ('author_email', models.CharField(blank=True, help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author email')),
38 ('revision', models.IntegerField(db_index=True, verbose_name='revision')),
39 ('description', models.TextField(blank=True, default=b'', verbose_name='description')),
40 ('created_at', models.DateTimeField(db_index=True, default=datetime.datetime.now, editable=False)),
41 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
42 ('data', models.FileField(storage=dvcs.storage.GzipFileSystemStorage(location=os.path.join(settings.MEDIA_ROOT, 'dvcs')), upload_to=dvcs.models.data_upload_to, verbose_name='data')),
43 ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='author')),
44 ('merge_parent', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='merge_children', to='tests.ADocumentChange', verbose_name='merge parent')),
45 ('parent', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='tests.ADocumentChange', verbose_name='parent')),
48 'ordering': ('created_at',),
50 'verbose_name': 'change for: a document',
51 'verbose_name_plural': 'changes for: a document',
54 migrations.CreateModel(
57 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
58 ('name', models.CharField(max_length=64, verbose_name='name')),
59 ('slug', models.SlugField(blank=True, max_length=64, null=True, unique=True, verbose_name='slug')),
60 ('ordering', models.IntegerField(verbose_name='ordering')),
63 'ordering': ['ordering'],
65 'verbose_name': 'tag for: a document',
66 'verbose_name_plural': 'tags for: a document',
70 model_name='adocumentchange',
72 field=models.ManyToManyField(related_name='change_set', to='tests.ADocumentTag', verbose_name='tags'),
75 model_name='adocumentchange',
77 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='change_set', to='tests.ADocument', verbose_name='document'),
80 model_name='adocument',
82 field=models.ForeignKey(blank=True, default=None, editable=False, help_text="This document's current head.", null=True, on_delete=django.db.models.deletion.CASCADE, to='tests.ADocumentChange', verbose_name='head'),
85 model_name='adocument',
87 field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tests.ADocumentTag', verbose_name='stage'),
90 model_name='adocument',
92 field=models.ForeignKey(blank=True, help_text='Work assignment.', null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user'),
94 migrations.AlterUniqueTogether(
95 name='adocumentchange',
96 unique_together=set([('tree', 'revision')]),