Reduce the ugly, just bootstrap things.
[audio.git] / src / archive / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
3
4 from django.db import models, migrations
5 import archive.utils
6 import jsonfield.fields
7 import archive.models
8
9
10 class Migration(migrations.Migration):
11
12     dependencies = [
13     ]
14
15     operations = [
16         migrations.CreateModel(
17             name='Audiobook',
18             fields=[
19                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
20                 ('source_file', models.FileField(verbose_name='source file', max_length=255, editable=False, upload_to=archive.models.source_upload_to)),
21                 ('source_sha1', models.CharField(max_length=40, editable=False)),
22                 ('title', models.CharField(max_length=255, verbose_name='title')),
23                 ('part_name', models.CharField(default=b'', help_text='eg. chapter in a novel', max_length=255, verbose_name='part name', blank=True)),
24                 ('index', models.IntegerField(default=0, verbose_name='index')),
25                 ('parts_count', models.IntegerField(default=1, verbose_name='parts count')),
26                 ('artist', models.CharField(max_length=255, verbose_name='artist')),
27                 ('conductor', models.CharField(max_length=255, verbose_name='conductor')),
28                 ('encoded_by', models.CharField(max_length=255, verbose_name='encoded by')),
29                 ('date', models.CharField(max_length=255, verbose_name='date')),
30                 ('url', models.URLField(max_length=255, verbose_name='book url')),
31                 ('translator', models.CharField(max_length=255, null=True, verbose_name='translator', blank=True)),
32                 ('modified', models.DateTimeField(null=True, editable=False)),
33                 ('mp3_status', models.SmallIntegerField(null=True, editable=False, choices=[(1, 'Waiting'), (2, 'Encoding'), (3, 'Tagging'), (4, 'Sending')])),
34                 ('mp3_task', models.CharField(max_length=64, null=True, editable=False)),
35                 ('mp3_tags', jsonfield.fields.JSONField(null=True, editable=False)),
36                 ('mp3_file', models.FileField(storage=archive.utils.OverwriteStorage(), upload_to=b'archive/final', null=True, editable=False)),
37                 ('mp3_published_tags', jsonfield.fields.JSONField(null=True, editable=False)),
38                 ('mp3_published', models.DateTimeField(null=True, editable=False)),
39                 ('ogg_status', models.SmallIntegerField(null=True, editable=False, choices=[(1, 'Waiting'), (2, 'Encoding'), (3, 'Tagging'), (4, 'Sending')])),
40                 ('ogg_task', models.CharField(max_length=64, null=True, editable=False)),
41                 ('ogg_tags', jsonfield.fields.JSONField(null=True, editable=False)),
42                 ('ogg_file', models.FileField(storage=archive.utils.OverwriteStorage(), upload_to=b'archive/final', null=True, editable=False)),
43                 ('ogg_published_tags', jsonfield.fields.JSONField(null=True, editable=False)),
44                 ('ogg_published', models.DateTimeField(null=True, editable=False)),
45             ],
46             options={
47                 'ordering': ('title',),
48                 'verbose_name': 'audiobook',
49                 'verbose_name_plural': 'audiobooks',
50             },
51             bases=(models.Model,),
52         ),
53         migrations.CreateModel(
54             name='Project',
55             fields=[
56                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
57                 ('name', models.CharField(unique=True, max_length=128, verbose_name=b'Nazwa', db_index=True)),
58                 ('sponsors', models.TextField(null=True, verbose_name=b'Sponsorzy', blank=True)),
59             ],
60             options={
61                 'ordering': ('name',),
62                 'verbose_name': 'project',
63                 'verbose_name_plural': 'projects',
64             },
65             bases=(models.Model,),
66         ),
67         migrations.AddField(
68             model_name='audiobook',
69             name='project',
70             field=models.ForeignKey(verbose_name='project', to='archive.Project'),
71             preserve_default=True,
72         ),
73     ]