d490d6e48def35d3da071276ec0529372700ea59
[wolnelektury.git] / src / lesmianator / migrations / 0001_initial.py
1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from django.db import models, migrations
5 import django.db.models.deletion
6 from django.conf import settings
7
8
9 class Migration(migrations.Migration):
10
11     dependencies = [
12         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
13         ('contenttypes', '0001_initial'),
14     ]
15
16     operations = [
17         migrations.CreateModel(
18             name='Continuations',
19             fields=[
20                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
21                 ('pickle', models.FileField(upload_to='lesmianator', verbose_name='Continuations file')),
22                 ('object_id', models.PositiveIntegerField()),
23                 ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
24             ],
25             options={
26             },
27             bases=(models.Model,),
28         ),
29         migrations.CreateModel(
30             name='Poem',
31             fields=[
32                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
33                 ('slug', models.SlugField(max_length=120, verbose_name='Slug')),
34                 ('text', models.TextField(verbose_name='text')),
35                 ('created_from', models.TextField(null=True, verbose_name='Additional information', blank=True)),
36                 ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date')),
37                 ('seen_at', models.DateTimeField(auto_now_add=True, verbose_name='last view date')),
38                 ('view_count', models.IntegerField(default=1, verbose_name='view count')),
39                 ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, null=True)),
40             ],
41             options={
42             },
43             bases=(models.Model,),
44         ),
45         migrations.AlterUniqueTogether(
46             name='continuations',
47             unique_together=set([('content_type', 'object_id')]),
48         ),
49     ]