Trivial updates.
[wolnelektury.git] / src / isbn / migrations / 0001_initial.py
1 from django.db import migrations, models
2 import django.db.models.deletion
3 import jsonfield.fields
4
5
6 class Migration(migrations.Migration):
7
8     dependencies = [
9     ]
10
11     operations = [
12         migrations.CreateModel(
13             name='ISBNPool',
14             fields=[
15                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
16                 ('prefix', models.CharField(max_length=10)),
17                 ('suffix_from', models.IntegerField()),
18                 ('suffix_to', models.IntegerField()),
19                 ('ref_from', models.IntegerField()),
20                 ('next_suffix', models.IntegerField()),
21             ],
22         ),
23         migrations.CreateModel(
24             name='ONIXRecord',
25             fields=[
26                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
27                 ('datestamp', models.DateField(auto_now=True)),
28                 ('suffix', models.IntegerField()),
29                 ('product_form', models.CharField(max_length=4)),
30                 ('product_form_detail', models.CharField(max_length=8, blank=True)),
31                 ('title', models.CharField(max_length=256)),
32                 ('part_number', models.CharField(max_length=64, blank=True)),
33                 ('contributors', jsonfield.fields.JSONField()),
34                 ('edition_type', models.CharField(max_length=4)),
35                 ('edition_number', models.IntegerField(default=1)),
36                 ('language', models.CharField(max_length=4)),
37                 ('imprint', models.CharField(max_length=256)),
38                 ('publishing_date', models.DateField()),
39                 ('isbn_pool', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='isbn.ISBNPool')),
40             ],
41         ),
42     ]