fix
[redakcja.git] / src / depot / migrations / 0002_legimibookpublish_legimichunkpublish.py
1 # Generated by Django 3.2.12 on 2022-07-14 10:36
2
3 from django.conf import settings
4 from django.db import migrations, models
5 import django.db.models.deletion
6
7
8 class Migration(migrations.Migration):
9
10     dependencies = [
11         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12         ('documents', '0008_book_legimi_id'),
13         ('depot', '0001_initial'),
14     ]
15
16     operations = [
17         migrations.CreateModel(
18             name='LegimiBookPublish',
19             fields=[
20                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21                 ('created_at', models.DateTimeField()),
22                 ('started_at', models.DateTimeField(blank=True, null=True)),
23                 ('finished_at', models.DateTimeField(blank=True, null=True)),
24                 ('status', models.PositiveSmallIntegerField(choices=[(0, 'queued'), (10, 'running'), (100, 'done'), (110, 'error')], default=0)),
25                 ('error', models.TextField(blank=True)),
26                 ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='documents.book')),
27                 ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
28             ],
29         ),
30         migrations.CreateModel(
31             name='LegimiChunkPublish',
32             fields=[
33                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
34                 ('book_publish', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='depot.legimibookpublish')),
35                 ('change', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='documents.chunkchange')),
36             ],
37         ),
38     ]