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