More author data in catalogue.
[redakcja.git] / src / wlxml / migrations / 0001_initial.py
1 # Generated by Django 3.1.13 on 2021-08-13 15:44
2
3 from django.db import migrations, models
4 import django.db.models.deletion
5
6
7 class Migration(migrations.Migration):
8
9     initial = True
10
11     dependencies = [
12         ('documents', '0006_auto_20210706_0130'),
13     ]
14
15     operations = [
16         migrations.CreateModel(
17             name='Attribute',
18             fields=[
19                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20                 ('name', models.CharField(max_length=255)),
21             ],
22             options={
23                 'verbose_name': 'attribute',
24                 'verbose_name_plural': 'attribute',
25             },
26         ),
27         migrations.CreateModel(
28             name='Tag',
29             fields=[
30                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
31                 ('name', models.CharField(db_index=True, max_length=255, unique=True)),
32                 ('type', models.CharField(blank=True, choices=[('section', 'Section, contains blocks'), ('div', 'Block element, like a paragraph'), ('span', 'Inline element, like an emphasis'), ('sep', 'Separator, has no content'), ('aside', 'Aside content, like a footnote'), ('verse', 'Verse element')], max_length=255)),
33                 ('editor_css', models.TextField(blank=True)),
34                 ('editor_css_after', models.TextField(blank=True)),
35                 ('similar_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='wlxml.tag')),
36             ],
37             options={
38                 'verbose_name': 'tag',
39                 'verbose_name_plural': 'tags',
40             },
41         ),
42         migrations.CreateModel(
43             name='TagUsage',
44             fields=[
45                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
46                 ('chunk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='documents.chunk')),
47                 ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wlxml.tag')),
48             ],
49             options={
50                 'verbose_name': 'tag usage',
51                 'verbose_name_plural': 'tags usage',
52             },
53         ),
54         migrations.CreateModel(
55             name='AttributeUsage',
56             fields=[
57                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
58                 ('value', models.CharField(blank=True, max_length=2048)),
59                 ('attribute', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wlxml.attribute')),
60                 ('tag_usage', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wlxml.tagusage')),
61             ],
62             options={
63                 'verbose_name': 'attribute usage',
64                 'verbose_name_plural': 'attributes usage',
65             },
66         ),
67         migrations.AddField(
68             model_name='attribute',
69             name='tag',
70             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wlxml.tag'),
71         ),
72         migrations.AlterUniqueTogether(
73             name='attribute',
74             unique_together={('tag', 'name')},
75         ),
76     ]