1 | # Generated by Django 5.1.dev20230928194939 on 2023-09-28 20:37
|
---|
2 |
|
---|
3 | import django.db.models.deletion
|
---|
4 | from django.db import migrations, models
|
---|
5 |
|
---|
6 |
|
---|
7 | class Migration(migrations.Migration):
|
---|
8 | initial = True
|
---|
9 |
|
---|
10 | dependencies = []
|
---|
11 |
|
---|
12 | operations = [
|
---|
13 | migrations.CreateModel(
|
---|
14 | name='Person',
|
---|
15 | fields=[
|
---|
16 | (
|
---|
17 | 'id',
|
---|
18 | models.BigAutoField(
|
---|
19 | auto_created=True,
|
---|
20 | primary_key=True,
|
---|
21 | serialize=False,
|
---|
22 | verbose_name='ID',
|
---|
23 | ),
|
---|
24 | ),
|
---|
25 | ('name', models.CharField(max_length=255)),
|
---|
26 | ],
|
---|
27 | ),
|
---|
28 | migrations.CreateModel(
|
---|
29 | name='Relation',
|
---|
30 | fields=[
|
---|
31 | (
|
---|
32 | 'id',
|
---|
33 | models.BigAutoField(
|
---|
34 | auto_created=True,
|
---|
35 | primary_key=True,
|
---|
36 | serialize=False,
|
---|
37 | verbose_name='ID',
|
---|
38 | ),
|
---|
39 | ),
|
---|
40 | (
|
---|
41 | 'child',
|
---|
42 | models.ForeignKey(
|
---|
43 | on_delete=django.db.models.deletion.CASCADE,
|
---|
44 | related_name='relations_as_child',
|
---|
45 | to='ticket_34881.person',
|
---|
46 | ),
|
---|
47 | ),
|
---|
48 | (
|
---|
49 | 'parent',
|
---|
50 | models.ForeignKey(
|
---|
51 | on_delete=django.db.models.deletion.CASCADE,
|
---|
52 | related_name='relations_as_parent',
|
---|
53 | to='ticket_34881.person',
|
---|
54 | ),
|
---|
55 | ),
|
---|
56 | ],
|
---|
57 | ),
|
---|
58 | migrations.AddField(
|
---|
59 | model_name='person',
|
---|
60 | name='parents_or_children',
|
---|
61 | field=models.ManyToManyField(
|
---|
62 | blank=True,
|
---|
63 | through='ticket_34881.Relation',
|
---|
64 | to='ticket_34881.person',
|
---|
65 | ),
|
---|
66 | ),
|
---|
67 | ]
|
---|