More housekeeping: remove nose and unused cruft.
[redakcja.git] / src / dvcs / tests / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 # Generated by Django 1.9.13 on 2019-02-28 00:55
3 from __future__ import unicode_literals
4
5 import datetime
6 import os.path
7 from django.conf import settings
8 from django.db import migrations, models
9 import django.db.models.deletion
10 import dvcs.models
11 import dvcs.storage
12
13
14 class Migration(migrations.Migration):
15
16     initial = True
17
18     dependencies = [
19         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
20     ]
21
22     operations = [
23         migrations.CreateModel(
24             name='ADocument',
25             fields=[
26                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
27                 ('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')),
28             ],
29             options={
30                 'abstract': False,
31             },
32         ),
33         migrations.CreateModel(
34             name='ADocumentChange',
35             fields=[
36                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
37                 ('author_name', models.CharField(blank=True, help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author name')),
38                 ('author_email', models.CharField(blank=True, help_text='Used if author is not set.', max_length=128, null=True, verbose_name='author email')),
39                 ('revision', models.IntegerField(db_index=True, verbose_name='revision')),
40                 ('description', models.TextField(blank=True, default=b'', verbose_name='description')),
41                 ('created_at', models.DateTimeField(db_index=True, default=datetime.datetime.now, editable=False)),
42                 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
43                 ('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')),
44                 ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='author')),
45                 ('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')),
46                 ('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')),
47             ],
48             options={
49                 'ordering': ('created_at',),
50                 'abstract': False,
51                 'verbose_name': 'change for: a document',
52                 'verbose_name_plural': 'changes for: a document',
53             },
54         ),
55         migrations.CreateModel(
56             name='ADocumentTag',
57             fields=[
58                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
59                 ('name', models.CharField(max_length=64, verbose_name='name')),
60                 ('slug', models.SlugField(blank=True, max_length=64, null=True, unique=True, verbose_name='slug')),
61                 ('ordering', models.IntegerField(verbose_name='ordering')),
62             ],
63             options={
64                 'ordering': ['ordering'],
65                 'abstract': False,
66                 'verbose_name': 'tag for: a document',
67                 'verbose_name_plural': 'tags for: a document',
68             },
69         ),
70         migrations.AddField(
71             model_name='adocumentchange',
72             name='tags',
73             field=models.ManyToManyField(related_name='change_set', to='tests.ADocumentTag', verbose_name='tags'),
74         ),
75         migrations.AddField(
76             model_name='adocumentchange',
77             name='tree',
78             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='change_set', to='tests.ADocument', verbose_name='document'),
79         ),
80         migrations.AddField(
81             model_name='adocument',
82             name='head',
83             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'),
84         ),
85         migrations.AddField(
86             model_name='adocument',
87             name='stage',
88             field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tests.ADocumentTag', verbose_name='stage'),
89         ),
90         migrations.AddField(
91             model_name='adocument',
92             name='user',
93             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         ),
95         migrations.AlterUniqueTogether(
96             name='adocumentchange',
97             unique_together=set([('tree', 'revision')]),
98         ),
99     ]